ID: 12127
Comment by: steve at goooooogle dot com
Reported By: bitlz at mail dot ru
Status: No Feedback
Bug Type: Filesystem function related
Operating System: Windows 2000 Professional
PHP Version: 4.3.1
New Comment:
confirming on PHP 5.2.0-8
Csv file line:-
1,Alert Status,État de l'alerte
fgetcsv ignores the É
It only happens if É is right after the delimiter ,
Only way I got around this was to save the file as UTF8 as mention in
the earlier comment. Didnt work even with
setlocale(LC_ALL,'fr_FR.ISO-8859-1')
Previous Comments:
------------------------------------------------------------------------
[2007-06-01 12:58:59] laus at tinevej dot dk
I got the same problem in php-5.2.2 with danish special letters (ÆØÅ)
when it is saved in iso-8859-1.
But if i save the csv files as utf-8 the problem disappears.
------------------------------------------------------------------------
[2006-11-24 09:32:47] info at netangels dot ru
Guys
The problem still occurs even in PHP 5.2.0 and PHP 5.1.x as well as in
5.0.x but we've found a workaround.
If csv-file is in russian encoding (cp1251) then php-script should do:
setlocale(LC_ALL, "ru_RU");
BEFORE call fgetcsv() if current locale is not ru_RU. If locale is
ru_RU already, it works well on all versions of php from 4.3.x up to the
latest 5.2.0 without requiring setlocale()
------------------------------------------------------------------------
[2003-03-09 18:41:00] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2003-02-28 07:25:15] moriyoshi@php.net
And actually bug #21689 is a duplicate of this report...
------------------------------------------------------------------------
[2003-02-28 07:16:20] moriyoshi@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
I've already committed a fix for this issue.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/12127--
Edit this bug report at http://bugs.php.net/?id=12127&edit=1