Cannot get correct characters from Excel (in utf8 format) in PHP

There are many questions and answers to all kinds of character encoding problems, but none of them seem to solve my problem.

Every month I get a table that needs to be converted to Prestashop data. I still help myself by first converting .xls to .csv, but it would be much easier if I could do it at a time.

I am using PHP-ExcelReader to read a .xls file which is saved in Unicode (UTF-8). My problem is that regardless of the encoding of the output, there are always several characters that will not be displayed properly.

I created a test page to show exactly what happens under what conditions: http://www.num1.nl/test.php

Hope someone can help.

+4
source share
1 answer

@ grahamj42, I know this is not true, but all the characters that I need are handled correctly. For test setup only, it was easier to display the entire range.

@Captain Payalytic, phpExcel really helped. All main characters are handled correctly.

Now I only need to find out why phpExcel extends the data range with 1 row.

Thanks so much for the tip :)

+1
source

All Articles