ID:               12127
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bitlz at mail dot ru
 Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Windows 2000 Professional
-PHP Version:      4.2.1
+PHP Version:      4.3.1
 New Comment:

Well, reproducing this bug on 4.3.0, 4.3.1

Code:
<?
 $fh=fopen('1.csv','rb');
 while (!feof($fh)) {
  $array[]=fgetcsv($fh,1024,';','"');
 }
 fclose($fh);
 print_r($array);
?>

CSV:
F11;KDV;Джеймс Бонд. И одного мира мало;1:53:07;598
;;Plazma - Take My Love;;
F12;Film;Джеймс Бонд. Золотой пистолет;2:00:15;680
F14;МиссияНевыполним;Миссия невыполнима 2;2:01:53;689
F24;Bedazzled;Ослепленный желаниями;1:31:47;672
F27;Марсианин;Мой любимый марсианин;1:33:31;597

Result:
Array
(
    [0] => Array
        (
            [0] => F11
            [1] => KDV
            [2] => Джеймс Бонд. И одного мира мало
            [3] => 1:53:07
            [4] => 598
        )

    [1] => Array
        (
            [0] => 
            [1] => 
            [2] => Plazma - Take My Love
            [3] => 
            [4] => 
        )

    [2] => Array
        (
            [0] => F12
            [1] => Film
            [2] => Джеймс Бонд. Золотой пистол
            [3] => 2:00:15
            [4] => 680
        )

    [3] => Array
        (
            [0] => F14
            [1] => иссияНевыполним
            [2] => иссия невыполнима 2
            [3] => 2:01:53
            [4] => 689
        )

    [4] => Array
        (
            [0] => F24
            [1] => Bedazzled
            [2] => слепленный желаниями
            [3] => 1:31:47
            [4] => 672
        )

    [5] => Array
        (
            [0] => F27
            [1] => арсианин
            [2] => ой любимый марсианин
            [3] => 1:33:31
            [4] => 597
        )

    [6] => 
)

Looks like it still loses foreign letters. Please REMOVE all foreign
letter checks from FGETCSV. Strange behavior sometimes results in
entire fields being lost.



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

[2003-02-28 07:13:06] [EMAIL PROTECTED]

Well, reproducing this bug on 4.3.0, 4.3.1

Code:
<?
 $fh=fopen('1.csv','rb');
 while (!feof($fh)) {
  $array[]=fgetcsv($fh,1024,';','"');
 }
 fclose($fh);
 print_r($array);
?>

CSV:
F11;KDV;Джеймс Бонд. И одного мира мало;1:53:07;598
;;Plazma - Take My Love;;
F12;Film;Джеймс Бонд. Золотой пистолет;2:00:15;680
F14;МиссияНевыполним;Миссия невыполнима 2;2:01:53;689
F24;Bedazzled;Ослепленный желаниями;1:31:47;672
F27;Марсианин;Мой любимый марсианин;1:33:31;597

Result:
Array
(
    [0] => Array
        (
            [0] => F11
            [1] => KDV
            [2] => Джеймс Бонд. И одного мира мало
            [3] => 1:53:07
            [4] => 598
        )

    [1] => Array
        (
            [0] => 
            [1] => 
            [2] => Plazma - Take My Love
            [3] => 
            [4] => 
        )

    [2] => Array
        (
            [0] => F12
            [1] => Film
            [2] => Джеймс Бонд. Золотой пистол
            [3] => 2:00:15
            [4] => 680
        )

    [3] => Array
        (
            [0] => F14
            [1] => иссияНевыполним
            [2] => иссия невыполнима 2
            [3] => 2:01:53
            [4] => 689
        )

    [4] => Array
        (
            [0] => F24
            [1] => Bedazzled
            [2] => слепленный желаниями
            [3] => 1:31:47
            [4] => 672
        )

    [5] => Array
        (
            [0] => F27
            [1] => арсианин
            [2] => ой любимый марсианин
            [3] => 1:33:31
            [4] => 597
        )

    [6] => 
)

Looks like it still loses foreign letters. Please REMOVE all foreign
letter checks from FGETCSV. Strange behavior sometimes results in
entire fields being lost.


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

[2002-12-03 03:48:41] pavel dot golub at farata dot kr dot ua

I have Windows 98 SE and also have such bug. But in my case there is
only one missing character - russian letter "T". I use php-4.2.3

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

[2002-08-30 13:38:19] terrust at mail dot ru

I have the same problem (php4.2.2 + Win2000Prof).
You can use fgets() and then explode() instead of fgetcsv()till
somebody fix this bug.

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

[2002-07-08 08:19:50] tty at tty dot ru

I tried
php 4.0.5, 4.0.6, 4.1.1, 4.1.2, 4.2.0
on Win2000AS, Win2000S, WinXP
and i saw this bug =((( 
So I had to host my script on FreeBSD server. it's not good for me,
because server isn't mine.

in which version of PHP this bug will be fixed?

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

[2002-07-08 01:00:10] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/12127

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

Reply via email to