danielrgn / php-excel-reader

Automatically exported from code.google.com/p/php-excel-reader
0 stars 0 forks source link

read16bitstring() is buggy in v2.21 #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Function read16bitstring() incorrectly calculates length of 16-bit strings, 
resulting in cropped strings and 
corresponding notices from iconv() about incomplete multibyte characters.

To fix, please replace (line 830):

 while (ord($data[$start + $len]) + ord($data[$start + $len + 1]) > 0) $len++;

with:

 while (ord($data[$start + $len]) + ord($data[$start + $len + 1]) > 0) $len+=2;

Original issue reported on code.google.com by alexanderk23 on 22 Apr 2010 at 7:45

GoogleCodeExporter commented 8 years ago
For me it works perfectly! Thanks for fixing this bug.

Original comment by jmichel....@gmail.com on 2 Jul 2010 at 8:52