|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-21 13:07 UTC] nickmc at codemasters dot com
[2005-01-21 15:32 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 02:00:01 2025 UTC |
Description: ------------ Reading from a unicode-encoded text file with fgetcsv() works almost as intended, but each string in the resulting array contains a space after each character. Reproduce code: --------------- The string (saved as a unicode text file, tab delimited): "hello, this is a text file 1 2 3 4 5 6" Read using: $data = fgetcsv ($fp, 1000, "\t") Expected result: ---------------- You'd expect the output to be the same as if the file was ANSI format. Actual result: -------------- Browser output from a print_r($data) (looks OK): Array ( [0] => hello, this is a text file [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 ) Page HTML: Array ( [0] => h e l l o , t h i s i s a t e x t f i l e [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 )