note 82665 deleted from function.fgetcsv by nlopess

From: Date: Mon, 21 Apr 2008 08:56:41 +0000
Subject: note 82665 deleted from function.fgetcsv by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-138603@lists.php.net to get a copy of this message
Note Submitter: dfb67 [..at.] web.de ---- It took me hours to findout a strange behaviour of "fgetcsv()": (using PHP 5.2.x) the function fgetcsv is able to get out the following cell (with many special characters) from a csv-file (ISO ISO-8859-1) without any problems: <?php "__abcde_ÄÖÜäöü__°!"§$%&/()=?`_"; "_´\}][{³²^__|@€µ~__*+'-_;:.,__"; ?> Is was a test for me and since this worked I thought that everything would be fine in future... But then I found out that fgetcsv is NOT able to get out strings which BEGINS with some of the above special character (e.g. german Umlauts). That means it is not possible to get out strings like: <?php "Änderung" "Ödness" "Überflieger" ?> It will result in (after extracting): <?php "nderung" "dness" "berflieger" ?> can someone confirm / explain that ? (using CSV file with TAB as a delimiter "\t" an in ISO-8859-1 charset)

« previous php.notes (#138603) next »