|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-04 20:50 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
Description: ------------ fgetcsv does not handle extended ascii as separator or enclosure. This code does not works with 0xF0 (chr 240), and/or with enclosures (0xF1, ...) while it works with common comma/quotes. Tested also with setting up/changing locale. Reproduce code: --------------- $fp = fopen("test.csv", "w"); fwrite($fp, "A\xF0B\xF0C\xF0D"); fclose($fp); $fp = fopen("test.csv", "r"); $data = fgetcsv ($fp, 8192, '\xF0', ''); fclose($fp); print_r($data); Expected result: ---------------- Array ( [0] => A [1] => B [2] => C [3] => D ) Actual result: -------------- Array ( [0] => A?B?C?D )