#48353 [NEW]: fgetcsv inserts whitespaces
| From: | uhp at gmx dot net | Date: | Thu, 21 May 2009 10:06:51 +0000 |
| Subject: | #48353 [NEW]: fgetcsv inserts whitespaces | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137591@lists.php.net to get a copy of this message | ||
From: uhp at gmx dot net
Operating system: Debian lenny
PHP version: 5.2.9
PHP Bug Type: Filesystem function related
Bug description: fgetcsv inserts whitespaces
Description:
------------
I'm native german, so I hope you understand my problem.
fgetcsv inserts whitespaces after each character. The file looks like
Campaign Campaign Daily Budget
I think the same problem is described here
http://bugs.php.net/bug.php?id=31632
but I don't know if my file is also unicode-encoded
Reproduce code:
---------------
$handle = fopen("./test.csv", "r");
$headlines = fgetcsv($handle, 1000, "\t");
print_r($headlines);
Expected result:
----------------
Array
(
[0] => Campaign
[1] => Campaign Daily Budget
[2] => Ad Group
}
Actual result:
--------------
Array
(
[0] => C a m p a i g n
[1] => C a m p a i g n D a i l y B u d g e t
[2] => A d G r o u p
}
--
Edit bug report at http://bugs.php.net/?id=48353&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48353&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48353&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48353&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48353&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48353&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48353&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48353&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48353&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48353&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48353&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48353&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48353&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48353&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48353&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48353&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48353&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48353&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48353&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48353&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48353&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48353&r=mysqlcfg