Date: 07/17/02
- Next message: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc /howto cvs.xml howto.html.tar.gz howto.xml tools.xml working.xml"
- Previous message: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc / .cvsignore"
- Next in thread: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Maybe reply: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Maybe reply: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 18387
Updated by: sniper <email protected>
Reported By: svazulia <email protected>
Status: Open
-Bug Type: DOM XML related
+Bug Type: Documentation problem
Operating System: Windows (98,2000)
PHP Version: 4.2.1
New Comment:
reclassified
Previous Comments:
------------------------------------------------------------------------
[2002-07-17 13:48:52] flying <email protected>
I think it is expected behaviour. According to XML specification the
only encodings, XML parsers must support are UTF-8 and UTF-16. libxml2
by default supports them and iso-8859-1.
So you should workaround your problem by converting your XML documents
to UTF-8 (you can also do it on the fly using iconv() function).
2 PHP Developers: I think this bug should be moved to "Documentation
problem" category, because documentation miss this important note about
list of supported encodings and how to handle documents with other
encodings.
------------------------------------------------------------------------
[2002-07-17 03:55:14] svazulia <email protected>
short script:
<?php
if(!$dom = domxml_open_file("b00000000001.xml")) {
echo "Error while parsing the document\n";
exit;
}
$root = $dom->document_element();
print_r($root);
?>
return: "Error while parsing the document"
when xml document has encoding option, like this:
<?xml version="1.0" encoding='WINDOWS-1251' ?>
without "encoding='WINDOWS-1251'" it work ok.
------------------------------------------------------------------------
-- Edit this bug report at http://bugs.php.net/?id=18387&edit=1-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc /howto cvs.xml howto.html.tar.gz howto.xml tools.xml working.xml"
- Previous message: Gabor Hojtsy: "[PHP-DOC] cvs: phpdoc / .cvsignore"
- Next in thread: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Maybe reply: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Maybe reply: chregu <email protected>: "[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

