#45356 [Opn->Fbk]: fgetcsv() £ symbol stripped if first char in cell

From: Date: Sat, 19 Jul 2008 17:50:18 +0000
Subject: #45356 [Opn->Fbk]: fgetcsv() £ symbol stripped if first char in cell
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126991@lists.php.net to get a copy of this message
 ID:               45356
 Updated by:       mj@php.net
 Reported By:      al at txtlocal dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Linux
 PHP Version:      5.2.6
 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.

I'm unable to reproduce it with a simple scripts neither with 5.2.6 nor
with 5.3.0-dev.


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

[2008-06-25 18:08:31] al at txtlocal dot com

If you have csv file: 

name,price
James,£150

fgetcsv() will remove the £.

All other chars seem to be fine.

I have searched forums for an answer to this and there are a few
people
reporting the same - but no definitive answer.


In addition - this is only if the £ character in the first char in a
"cell".  This would work fine: 

name,price
James,1£50

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

[2008-06-25 17:46:40] al at txtlocal dot com

In addition - this is only if the £ character in the first char in a
"cell".  This would work fine: 

name,price
James,1£50

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

[2008-06-25 17:45:30] al at txtlocal dot com

Description:
------------
If you have csv file: 

name,price
James,£150

fgetcsv() will remove the £.

All other chars seem to be fine.

I have searched forums for an answer to this and there are a few people
reporting the same - but no definitive answer.





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


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



Thread (8 messages)

« previous php.bugs (#126991) next »