note 82665 added to function.fgetcsv

From: Date: Mon, 21 Apr 2008 08:03:18 +0000
Subject: note 82665 added to function.fgetcsv
Groups: php.notes 
Request: Send a blank email to php-notes+get-138601@lists.php.net to get a copy of this message
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) ---- Server IP: 217.13.201.10 Probable Submitter: 195.137.177.243 ---- Manual Page -- http://www.php.net/manual/en/function.fgetcsv.php Edit -- https://master.php.net/note/edit/82665 Del: integrated -- https://master.php.net/note/delete/82665/integrated Del: useless -- https://master.php.net/note/delete/82665/useless Del: bad code -- https://master.php.net/note/delete/82665/bad+code Del: spam -- https://master.php.net/note/delete/82665/spam Del: non-english -- https://master.php.net/note/delete/82665/non-english Del: in docs -- https://master.php.net/note/delete/82665/in+docs Del: other reasons-- https://master.php.net/note/delete/82665 Reject -- https://master.php.net/note/reject/82665 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#138601) next »