From:             pete at flifl dot com
Operating system: Linux RH9 Apache2.0.46 php4.3.2
PHP version:      4.3.4
PHP Bug Type:     *Languages/Translation
Bug description:  Using include/require with utf-8 files, BOM gets copied too much...

Description:
------------
When using include/require with utf-8 files, the Byte Order Mark (BOM)
apparently gets copied too many times. It will look like this:



00000000h: FF FE FF FE FF FE ...



where only one (FF FE) is supposed to be.





(php version in question is php4.3.2 and I could not find any mention of
this bug in either the change log OR the advanced search of bugs.php.net -
I expect the bug to still exist... version 5's just released)

Reproduce code:
---------------
Use ultraedit -> convert dos/ascii files to utf-8 (with unicode editing)
-> include one .php file in another -> observe multiple BOM's (FE FF's) by
view source of page in hex. 

Expected result:
----------------
The extra BOM's shows as "yb" (approx.) in ascii and as CRLF on
webpages...



The extra CRLF is *hardly* desirable...

Actual result:
--------------
The extra BOM's shows as "yb" (approx.) in ascii and as CRLF on
webpages...



The extra CRLF is *hardly* desirable...

-- 
Edit bug report at http://bugs.php.net/?id=27637&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27637&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27637&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27637&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27637&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27637&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27637&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27637&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27637&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27637&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27637&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27637&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27637&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27637&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27637&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27637&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27637&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27637&r=float

Reply via email to