ID:               38323
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zybersup at yahoo dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Unknown/Other Function
 Operating System: Windows XP Professional
 PHP Version:      4.4.3
-Assigned To:      
+Assigned To:      andrei


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

[2006-08-05 06:29:49] zybersup at yahoo dot com

You can get the testing INI files from the same place of the testing
script.

http://theguru.co.th/zybersup/test_utf8.ini
http://theguru.co.th/zybersup/test_utf8bom.ini
http://theguru.co.th/zybersup/test_utf8ascii.ini

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

[2006-08-04 19:49:33] [EMAIL PROTECTED]

Please provide access to the exact .ini file that is problematic. I
could not reproduce this on PHP 4 or 5.

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

[2006-08-04 17:24:34] zybersup at yahoo dot com

Script to reproduce the bug
============================

<?

$dir = dirname(__FILE__) . '/';
$ascii = parse_ini_file($dir . 'test_ascii.ini', true);
$utf8bom = parse_ini_file($dir . 'test_utf8bom.ini', true);
$utf8 = parse_ini_file($dir . 'test_utf8.ini', true);
print_r($ascii);
print_r($utf8bom);
print_r($utf8);

?>

Unsatisfied Result
===================
(Don't worry about the value, just check the difference of array
structure)

Array
(
    [Section1] => Array
        (
            [Aval] => &#3607;&#3604;&#3626;&#3629;&#3610;
&#3607;&#3604;&#3626;&#3629;&#3610; (Test Test)
            [Bval] => &#3652;&#3607;&#3618;
        )

    [Section2] => Array
        (
            [Cval] => Bar
            [Dval] => Foo
        )

)
Array
(
    [Aval] =>
&#3648;&#3608;—&#3648;&#3608;”&#3648;&#3608;&#3594;&#3648;&#3608;&#3597;&#3648;&#3608;&#65533;
&#3648;&#3608;—&#3648;&#3608;”&#3648;&#3608;&#3594;&#3648;&#3608;&#3597;&#3648;&#3608;&#65533;
(Test Test)
    [Bval] =>
&#3648;&#3609;&#65533;&#3648;&#3608;—&#3648;&#3608;&#3586;
    [Section2] => Array
        (
            [Cval] => Bar
            [Dval] => Foo
        )

)
Array
(
    [Section1] => Array
        (
            [Aval] =>
&#3648;&#3608;—&#3648;&#3608;”&#3648;&#3608;&#3594;&#3648;&#3608;&#3597;&#3648;&#3608;&#65533;
&#3648;&#3608;—&#3648;&#3608;”&#3648;&#3608;&#3594;&#3648;&#3608;&#3597;&#3648;&#3608;&#65533;
(Test Test)
            [Bval] =>
&#3648;&#3609;&#65533;&#3648;&#3608;—&#3648;&#3608;&#3586;
        )

    [Section2] => Array
        (
            [Cval] => Bar
            [Dval] => Foo
        )

)

Try testing a demo at
http://www.theguru.co.th/zybersup/test_parse_ini.php
(May not keep there more than 2 months)

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

[2006-08-04 07:55:08] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



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

[2006-08-04 02:20:24] zybersup at yahoo dot com

Forgot to add more detail that...

I have tested files encoded in ASCII, UTF-8 w/ BOM and UTF-8 w/o BOM on
both PHP4 and PHP5 (5.0.5)
Found no problem with ASCII and UTF-8 w/o BOM. Only UTF-8 w/ BOM has
problem.
Also I found no problem with PHP 5.0.5. So that this problem should not
caused by my INI file, I guess ;).

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

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/38323

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

Reply via email to