php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27637 Using include/require with utf-8 files, BOM gets copied too much...
Submitted: 2004-03-18 13:12 UTC Modified: 2004-03-18 13:51 UTC
From: pete at flifl dot com Assigned:
Status: Not a bug Package: *Languages/Translation
PHP Version: 4.3.4 OS: Linux RH9 Apache2.0.46 php4.3.2
Private report: No CVE-ID: None
 [2004-03-18 13:12 UTC] pete at flifl dot com
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...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-18 13:51 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dup of #22108
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 05:01:29 2024 UTC