0
votes

I have UTF-8 source data and I must to create CSV file which encoded in Windows-1252 character encoding.

I was tried with classic functions, but I haven't well results. It must support Serbian Characters: "čćžšđ" after converting.

Also I was tried to convert to CP1252, ISO-8859-1, ISO-8859-2 with functions: mb_convert_encoding, iconv and iconv_set_encoding.

Have anyone any idea what to try?

1
Note that all text encodings except UTF ones are notoriously unreliable, because there exists no system or standard to indicate which encoding a file is saved in.Nyerguds

1 Answers

2
votes

Windows-1252 does not contain Serbian letters, try Windows-1250 instead.

Both mb_convert_encoding() and iconv() should work.