ID:               36785
 Updated by:       [EMAIL PROTECTED]
 Reported By:      giunta_gaetano at libero dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         XML related
 Operating System: windows 2000
 PHP Version:      5.1.2
 New Comment:

The cause and the solution is properly explained in bug #33375.
NO bug here.


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

[2006-03-19 00:21:27] giunta_gaetano at libero dot it

Description:
------------
PLEASE REOPEN AND FIX BUG #33375!

It bewilders me that this has not yet been fixed in php 5.2.1...

It is a BC breakage against PHP 4, and makes very very little sense
anyway:

- xml does NOT mandate a charset specification in the prologue

- other communication/storage layers impose DIFFERENT standards on
charset declarations and default charset values that the xml spec does
by itself

to be more clear, a common example:
- received xml message has no charset in the prologue
- it is received over HTTP, and the http content-type header  states a
charset (it is authoritative, according to the specs)
- there is no way to tell the xml parser to use the correct charset for
parsing the message!

Why on earth was it not decided, when switching to libxml, that
xml_parser_create() would get some automagic new powers, while
xml_parser_create('ISO-8859-1') would be 100% backwards compatible and
let the coder specify a source charset???

PS: at least fix the manual, and clearly specify that in order for the
'magical charset detection' to work, the xml prologue MUST contain a
charset declaration!!!

PPS: last but not least: the column number where the error is found
(xml_get_current_column_number()) is also borked: whereas with php 4
the error reported the column corresponding to the first non-ascii char
found, with php 5 the error reports the column where the xml element
closing tag starts, which is a bit misleading...

Reproduce code:
---------------
Just try to parse any ISO-8859-1 xml file that has no charset specified
in the prologue.

Expected result:
----------------
no error

Actual result:
--------------
a dumb parsing error


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


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

Reply via email to