0

I use a php script with fgetcsv() to import data from csv files I did not create (no choice).

My problem is the data are imported to my database with a special character between each character, on each field...

For example, "Mounted print" is imported as "�M�o�u�n�t�e�d� �P�r�i�n�t�"

I tried to modify encoding with no result : utf8_encode/decode, iconv ...

Any idea ?

Thanks

  • 1
    Most likely the data is encoded in UTF-16, and you're not handling it correctly as such. What encoding is your data in? – deceze Dec 11 '14 at 09:23
  • That's it ! The CSV was encoded in Unicode. I saved the CSV in UTF-8 and everything is ok now. Thanks ! – Matthieu Marcé Dec 11 '14 at 09:56

0 Answers0