Edit report at http://bugs.php.net/bug.php?id=48507&edit=1
ID: 48507
Comment by: gjorgjioski at gmail dot com
Reported by: krynble at yahoo dot com dot br
Summary: fgetcsv() ignoring special characters
Status: Bogus
Type: Bug
Package: Filesystem function related
Operating System: Unix
PHP Version: 5.*
Block user comment: N
Private report: N
New Comment:
This is short example:
kategorija Å¡irina platiÅ¡Ä Å¡tevilo
read:
kategorija
irina platiÅ¡Ä
tevilo
expected:
kategorija
Å¡irina platiÅ¡Ä
število
Previous Comments:
------------------------------------------------------------------------
[2011-02-26 02:36:32] gjorgjioski at gmail dot com
This bug occurs also when file is in UTF8 (tab delimited file using
Å¡,Ä characters). I can provide an example.
------------------------------------------------------------------------
[2010-05-19 13:39:52] pahan at hubbitus dot spb dot su
> Quote from the docs:
> Note: Locale setting is taken into account by this function. If LANG
is e.g.
> en_US.UTF-8, files in one-byte encoding are read wrong by this
function.
Ok, bug documented as "are read wrong by this function" is better then
nothing.
But do you plan fix this wrong behaviour?
------------------------------------------------------------------------
[2010-05-18 11:03:42] mike@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Quote from the docs:
Note: Locale setting is taken into account by this function. If LANG is
e.g. en_US.UTF-8, files in one-byte encoding are read wrong by this
function.
------------------------------------------------------------------------
[2009-12-12 11:40:29] pahan at hubbitus dot spb dot su
Sorry for duplicate (#50456 is my), but in it, additionally to there
described problem in fgetcsv I also suggest fix fputcvs to allow [force]
enclosing single words in field.
Off course it does *not* solve this problem of incorrect fgetcsv
parsing, because RFC allow not quoted values (
http://www.faqs.org/rfcs/rfc4180.html , section
2.5 ), but, it is make
pair fputcsv/fgetcsv as minimum compatible in PHP implementation.
------------------------------------------------------------------------
[2009-12-12 01:33:51] jani@php.net
See also bug #50456
------------------------------------------------------------------------
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/bug.php?id=48507
--
Edit this bug report at http://bugs.php.net/bug.php?id=48507&edit=1