|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-12 12:42 UTC] wytsang at cse dot cuhk dot edu dot hk
[2002-07-12 18:05 UTC] sniper@php.net
[2002-07-13 02:15 UTC] wytsang at cse dot cuhk dot edu dot hk
[2002-07-13 02:41 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 04:00:01 2025 UTC |
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); ?>