0

I am trying to save an excel document with slovakian translations in it as a .CSV file. and it contains things like this:

"Svoj chybný komponent si môžete nechať opraviť v 3 jednoduchých krokoch:"

the foreign characters like ý, ô, ž, ť etc etc are all being replaced with question marks when I save it as a CSV file. I need the CSV file so I can use PHP to upload the contents to a database

does anybody know how I can stop this from happening?

Kevlar
  • 344
  • 1
  • 7
  • 25
  • Please keep asking questions on this website related to programming not computer usage. For computer usage please use the other Q&A site that is about computer usage (superuser.com). – hakre Jun 06 '13 at 12:34

2 Answers2

1

The special charactors are only dropped when you save directly from .xlsx to CSV. If you save the file to the old .xls filetype first and then convert that file to CSV, it should work.

Hugo Delsing
  • 13,803
  • 5
  • 45
  • 72
0

It's important to know that Excel has major bugs and shortcomings when handling CSV files containing non-ascii characters. There are a number of questions here on SO that discuss it, but the short answer is that it's very very difficult to get right. I suggest avoiding CSV format if possible.

Instead, you may be able to read the Excel file directly in PHP using a third-party library; there are several libs available that can do this.

Spudley
  • 166,037
  • 39
  • 233
  • 307