#22108 [Com]: php doesn't ignore the utf-8 BOM

From: Date: Mon, 22 Aug 2005 16:32:42 +0000
Subject: #22108 [Com]: php doesn't ignore the utf-8 BOM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83872@lists.php.net to get a copy of this message
ID: 22108 Comment by: jwagner at cc dot hut dot fi Reported By: bugzilla at jellycan dot com Status: Assigned Bug Type: Feature/Change Request Operating System: * PHP Version: * Assigned To: moriyoshi New Comment: PHP 5.0.4 for Windows /still/ does not seem to have it (enable-zend-multibyte) enabled by default. For example session_start() is broken for UTF-8 encoded php files. I would strongly suggest to make enable-zend-multibyte a default for the windows release! Previous Comments: ------------------------------------------------------------------------ [2005-01-12 23:43:27] lapo at lapo dot it > Is it possible to port this support for windows too? Of course I quoted the wrong like, zend-multibyte support is POSSIBLE (not DEFAULT) in the Windows version. ------------------------------------------------------------------------ [2005-01-12 18:36:08] lapo at lapo dot it > How about making this --enable-zend-multibyte default option? It is already available on Windows. In fact, I'm using it on a production server since june 2003, with no problems and with many satisfactions. Any reason this is still not in by default? Someone else is encountering bugs with it? ------------------------------------------------------------------------ [2005-01-06 21:08:05] techtonik@php.net How about making this --enable-zend-multibyte default option? Is it possible to port this support for windows too? And for 4.3.x branch? Should it be marked open again? ------------------------------------------------------------------------ [2004-05-25 12:33:30] lapo at lapo dot it Adding '--enable-zend-multibyte' to latest PHP5 port for FreeBSD for sure solves the problem: All files contain: <? header("Content-Language: it"); echo "àèéìòù\n"; ?> cyberx [~] $ php /usr/tmp/utf8-bom.php à èéìòù cyberx [~] $ php /usr/tmp/utf8Y-bom.php àèéìòù cyberx [~] $ php /usr/tmp/utf16-bom.php àèéìòù cyberx [~] $ php /usr/tmp/utf16BE-bom.php àèéìòù cyberx [~] $ php /usr/tmp/utf16LE-bom.php àèéìòù Except for "UTF8 without BOM" that is, of course, not distinguishable from ISO8859-15 (default here), all theother formats are correctly interpreted and outputted. (notice that the 'header' instruction prior of the 'echo' one would stutter with a non-BOM-aware PHP compile). I wonder if and when this great multibyte support would be available by default in Win32 compiles, I would really use it for work and am not willing to but VisualC just to compile that ;-) (though I'm trying compiling it with cygwin's gcc using '-mno-cygwin' option, we'll see...) ------------------------------------------------------------------------ [2003-11-09 16:12:50] a9c83cd8bb41db324db5b449352f183 at arcor dot de Thought about it... Now I think it's better when the BOM isn't part of the output because that would cause trouble if you want to output images or PDF or something like that... ------------------------------------------------------------------------ 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/22108 -- Edit this bug report at http://bugs.php.net/?id=22108&edit=1

« previous php.bugs (#83872) next »