Bug #18318: fgetcsv() cannot duel with some Chinese characters

From: Date: Fri, 12 Jul 2002 16:37:09 +0000
Subject: Bug #18318: fgetcsv() cannot duel with some Chinese characters
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13993@lists.php.net to get a copy of this message
From: wytsang@cse.cuhk.edu.hk Operating system: Windows 98 PHP version: 4.2.1 PHP Bug Type: Filesystem function related Bug description: fgetcsv() cannot duel with some Chinese characters I find that the function fgetcsv() cannot duel with Chinese characters "Áø" and "½÷" before comma ",". I solve the problem by using fgets() and split() instead of fgetcsv(). <?php # artist.csv is a file with only one line # the line is "±ç¤ÖÁø,¤k" $fp = fopen ("artist.csv", "r"); while ($data = fgetcsv ($fp, 1000, ",")) { echo $data[0]."-".$data[1]; /* We find that the last Chinese char of $data[0] "Áø" is displayed as "?" */ } fclose($fp); ?> -- Edit bug report at http://bugs.php.net/?id=18318&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18318&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18318&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18318&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18318&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18318&r=support Expected behavior: http://bugs.php.net/fix.php?id=18318&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18318&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18318&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18318&r=globals

« previous php.bugs (#13993) next »