#48507 [Opn->Fbk]: fgetcsv() ignoring special characters

From: Date: Wed, 10 Jun 2009 12:47:52 +0000
Subject: #48507 [Opn->Fbk]: fgetcsv() ignoring special characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138164@lists.php.net to get a copy of this message
 ID:               48507
 Updated by:       jani@php.net
-Summary:          fgetcsv ignoring special characters
 Reported By:      krynble at yahoo dot com dot br
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Unix
 PHP Version:      5.2.9
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




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

[2009-06-09 14:18:39] krynble at yahoo dot com dot br

Description:
------------
Problem using fgetcsv ignoring special characters at the begining of a

string.

The example I had was using the word "ÓTICA" with the "#" character as

separator.

Reproduce code:
---------------
Consider a file with the following contents: WEIRD#ÓTICA#BEHAVIOR

When using fgetcsv to parse this file, I get an output like this:

Array(
   [0] => WEIRD,
   [1] => TICA,
   [2] => BEHAVIOR
)

Expected result:
----------------
Array(
   [0] => WEIRD,
   [1] => ÓTICA,
   [2] => BEHAVIOR
)

Actual result:
--------------
Array(
   [0] => WEIRD,
   [1] => TICA,
   [2] => BEHAVIOR
)


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


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



Thread (27 messages)

« previous php.bugs (#138164) next »