ID:               42163
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nikhil dot gupta at in dot ibm dot com
-Status:           Open
+Status:           Closed
 Bug Type:         *Unicode Issues
 Operating System: Linux, Win32-xp
 PHP Version:      6CVS-2007-08-01 (snap)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2007-08-01 08:43:33] nikhil dot gupta at in dot ibm dot com

Description:
------------
fgetcsv() outputs different results with and without Unicode on Windows
and Linux.

Reproduce code:
---------------
--TEST--
Test fgetcsv()
--FILE--
<?php

$filename = dirname(__FILE__) . '/fgetcsv.tmp';


// create the file and add the content with has csv fields
$file_handle = fopen($filename, "w+t" );

$delimiter = '-';
$enclosure = '-';
$csv_field = '-water---fruit---air-';


@fwrite($file_handle, $csv_field );

// rewind the file pointer to bof
rewind($file_handle);

// use the right delimiter and enclosure with max length
var_dump( fgetcsv($file_handle, 1024, $delimiter, $enclosure) );

// close the file
fclose($file_handle);
//delete file
unlink($filename);

echo "Done\n";
?>
--EXPECT--

Expected result:
----------------
array(2) {
  [0]=>
  string(11) "water-fruit"
  [1]=>
  string(3) "air"
}
Done

Actual result:
--------------
array(1) {
  [0]=>
  unicode(12) "[EMAIL PROTECTED]@[EMAIL PROTECTED]"
}
Done


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


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

Reply via email to