|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-09-13 16:56 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2018-09-13 16:56 UTC] cmb@php.net
[2018-09-14 01:25 UTC] zhouliweb at sina dot com
[2018-09-14 08:35 UTC] cmb@php.net
-Status: Feedback
+Status: Open
-Assigned To: cmb
+Assigned To:
[2018-09-14 08:35 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ While has japanese in the csv, fgetcsv get line error. More detail see the test script. Test script: --------------- $filename = "a.csv"; $file = fopen($filename, "r"); while(!feof($file) && $data = fgetcsv($file)) { echo json_encode($data) . "\n"; } fclose($file); a.csv is like this:(3 lines, the first line is unix LF, others is windows CR+LF) "a ましょう。" b Expected result: ---------------- ["a\n\u307e\u3057\u3087\u3046\u3002"] ["b"] Actual result: -------------- ["a\n\u307e\u3057\u3087\u3046\u3002\"\r\nb\r\n"]