ID: 30335
Comment by: hkroger at gmail dot com
Reported By: gruszczol1 at poczta dot onet dot pl
Status: No Feedback
Bug Type: Filesystem function related
Operating System: linux
PHP Version: 5.0.2
New Comment:
I can confirm that this still occurs on PHP 5.1.6 on Linux with
windows-1250 text files. Please open it again.
Previous Comments:
------------------------------------------------------------------------
[2005-11-11 13:53:04] mdv at inyourpocket dot com
i tested in on php 5.0.5
------------------------------------------------------------------------
[2005-11-11 13:49:51] mdv at inyourpocket dot com
it looks that fgetcsv depends on locales
<?php
$argv[1] = './x.txt';
if (!($fd = fopen($argv[1], 'r')))
die('Can\'t open file');
while (!feof($fd))
echo fgets($fd, 4096);
fclose($fd);
if (!($fd = fopen($argv[1], 'r')))
die('Can\'t open file');
while (($l = fgetcsv($fd, 4096, "\t")))
print_r($l);
fclose($fd);
?>
x.txt get here http://lampa.naut.cz/x.txt (text contains text
windows-1250 encoding "aa©\t©vvv" \t is TAB)
result when locale POSIX:
aa© ©vvv
Array
(
[0] => aa©
[1] => vvv
)
result when locale cs_CZ:
aa© ©vvv
Array
(
[0] => aa©
[1] => ©vvv
)
------------------------------------------------------------------------
[2004-10-16 01:00:02] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2004-10-07 17:15:23] [EMAIL PROTECTED]
Try setting LC_CTYPE (or LANG) environment variable to
"pl_PL.ISO-8859-2".
------------------------------------------------------------------------
[2004-10-07 01:38:48] [EMAIL PROTECTED]
Specific to 5.X
------------------------------------------------------------------------
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/30335
--
Edit this bug report at http://bugs.php.net/?id=30335&edit=1