#40811 [Opn->Fbk]: fgetcsv() strange behaviour

From: Date: Thu, 15 Mar 2007 13:01:55 +0000
Subject: #40811 [Opn->Fbk]: fgetcsv() strange behaviour
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110381@lists.php.net to get a copy of this message
 ID:               40811
 Updated by:       tony2001@php.net
 Reported By:      websites at mtu-net dot ru
-Status:           Open
+Status:           Feedback
-Bug Type:         *Languages/Translation
+Bug Type:         Filesystem function related
 Operating System: Linux
 PHP Version:      5.2.1
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2007-03-15 08:33:18] websites at mtu-net dot ru

Description:
------------
When opening an .csv-file with fgetcsv() most part of cyrillic
(win-1251) characters disappears, and they are returned as an empty
string in returned list. Everything's OK with latin characters.

Reproduce code:
---------------
$fp=fopen("csv.csv","r");
while ($arr=fgetcsv($fp, 1000, ";"))
 {
  *here comes a bunch of outputs*

Expected result:
----------------
Expected: all strings neatly packed in a list =)

Actual result:
--------------
Result: almost all string fields in a list are empty


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40811&edit=1


Thread (7 messages)

« previous php.bugs (#110381) next »