The Swedish alphabet contains the letters
åäö
I try to read a csv file with the PHP function fgetcsv but I get encoding problems and the special characters are not correctly interpreted.
I open the file with fopen ( $filePath, "r" ) and I do not speciay any encoding that anywhere in PHP that I am aware of. Everything else in my application works fine regarding to encoding.
When I open the target csv file in open office suite I can select encoding. If I select Unicode(UTF-8) the special characters can not be displayed. If I select some ISO-8859, the letters are correctly displayed.
I have been playing around with utf8_decode, utf8_encode, mb_convert_encoding, iconv and setlocale with no luck.
I know what encoding is but I do not understand this case. It would be nice with a solution and a good explanation of what is going on here.
I guess my file is ISO-8859-* encoded
How can I parse the file correctly so I can make use of its content in PHP?