Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0RC3

Request #1822 Need charset parameter
Submitted: 2004-07-08 02:41 UTC Modified: 2004-07-12 15:30 UTC
From: mail at young dot org dot ua Assigned: davey
Status: Closed Package: XML_Tree
PHP Version: 4.3.6 OS: FreeBSD
Roadmaps: (Not assigned)    

 [2004-07-08 02:41 UTC] mail at young dot org dot ua
Description: ------------ I have some notes to your function function &getTreeFromFile () { $this->folding = false; $this->XML_Parser(null, 'event'); $err = $this->setInputFile($this->filename); if (PEAR::isError($err)) { return $err; } Which located in file Tree.php. When parameter null passed into XML_Parser, it create xml_parser_create with omitted optional parameter encoding and using default value ISO-8859-1. Thats why it is imposible to use UTF-8 encoding in XML-files during use your package. Please, can you add feature which allow specify charset for XML-file?


 [2004-07-12 15:30 UTC] davey
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. XML_Tree now takes an optional argument for XML_Tree::getTreeFromFile() and XML_Tree::getTreeFromString() function &getTreeFromFile ($encoding = null) { ... } and function &getTreeFromString($str, $encoding = null) { ... } This does NOT break BC. This fix will be included in the next release of XML_Tree, the current code will work if an encoding is specified in the XML source. - Davey