php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #36711 Document detect_unicode and mention that __halt_compiler doesn't affect it
Submitted: 2006-03-13 04:44 UTC Modified: 2009-11-23 13:19 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: judas dot iscariote at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5CVS-2006-03-13 (CVS) OS: *
Private report: No CVE-ID: None
 [2006-03-13 04:44 UTC] judas dot iscariote at gmail dot com
Description:
------------
This a reminder bug for Ilia.

related to talk we had about a problem of zend-multibyte

references :

http://fudforum.org/forum/index.php?t=msg&goto=30765


This effectively brokes FUDforum installer.
 

Reproduce code:
---------------
I reduced a lilte test case 14 lines ( and most code has been taked directly from the PHP documentation)

http://cl.php.net/manual/en/function.halt-compiler.php

it's available here :

http://www.onfocus.cl/judas/halt_compiler.php.bz2


the binarty part of the file just contains a bziped text file containing "This is a test string".

Tested very latest CVS 5.1.3.RC2-dev code.
this seems to be a regression of 

http://bugs.php.net/bug.php?id=35147

Expected result:
----------------
php compiled without --enable-zend-multibyte displays

string(65) "
BZh91AY&S�S@" 1�)Q^�
                    T,"(H~
                          t"

AFAIK, correct output, the binary data.

Actual result:
--------------
php compiled with zend multibyte:

in a web browser : nothing, ( not even binary content)
in cli : a lot of interrogation signs(??????????????????????????????????????????)





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 04:46 UTC] judas dot iscarriote at gmail dot com
fixed email address.
 [2006-03-13 04:47 UTC] judas dot iscariote at gmail dot com
...(please delete)
 [2006-03-13 05:20 UTC] judas dot iscariote at gmail dot com
Workaround : setting detect_unicode to Off make the things work as expected.
 [2006-03-13 08:25 UTC] tony2001@php.net
Bogusified by user request.
 [2006-03-13 08:35 UTC] judas dot iscariote at gmail dot com
I have never asked to make bogus the bug, just delete the comments introduced after change the email address..(comment is obligatory :( )
 [2006-03-27 17:26 UTC] dmitry@php.net
php -ddetect_unicode=0 halt_compiler.php
works fine.

This is not a PHP bug, but FUDforum installer's.

It should be fixed using -ddetect_unicode=0 (in the same way as PEAR installer was fixed).

Probably PHP documentation should explain that binary data after __halt_compiler() may drive multibyte PHP version to detect whole script as unicode.
 [2006-03-27 22:24 UTC] judas dot iscariote at gmail dot com
:S how this cannot be a bug if the engine behaves different in cases that should behave indentical ?

well.. then if this won't be fixed, fudforum installer should be fixed, and the PHP documentation should mention the bug,as a side effect...
 [2006-04-03 17:38 UTC] vrana@php.net
We don't have even detect_unicode documented.
 [2009-11-23 13:19 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=291204
Log: detect_unicode before __halt_compiler (bug #36711)
 [2009-11-23 13:19 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 22:01:26 2019 UTC