php-excel-reader - problem with UTF-8

前端 未结 2 735
一个人的身影
一个人的身影 2021-01-02 08:03

I\'m using php-excel-reader 2.21 for converting XLS file to CSV. I wrote a simple script to do that, but I have some problems with unicode characters. It does not return val

2条回答
  •  灰色年华
    2021-01-02 08:47

    I has the answer for this problem, use php_excel_reader like common! Add a function to Spreadsheet_Excel_Reader class:

    function seems_utf8($str) {
            for ($i=0; $i

    And add below line 1120: $retstr = $this->seems_utf8($retstr)?$retstr:utf8_encode($retstr);

    Finish!

    You can use file php_excel_reader, that i modify! Download here : File excel_reader2.php Use like common with Original-excel-reader

提交回复
热议问题