Re: Encoding support in SAX-like interface
| From: | Jirka Kosek | Date: | Thu, 23 Sep 2004 12:00:07 +0000 |
| Subject: | Re: Encoding support in SAX-like interface | ||
| References: | 1 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-460@lists.php.net to get a copy of this message | ||
Jirka Kosek wrote:
I know that in PHP4 and older xml_parser used expat parser as an underlying implementation and was limited to characters in ISO-8859-1. According to documentation in PHP5 xml_parser should be built on the top of libxml2. Thus I thought that it would support all encodings supported by libxml2. My experience is that characters outside of ISO-8859-1 are replaced by ? in the same way as expat does it.Never mind. I figured out that layering on top of libxml2 is little non-intuitive, but if I specify optional parameter on xml_parser_create() I can read document in whatever encoding supported by libxml2 and this encoding is internally converted into utf-8. $parser = xml_parser_create("utf-8"); -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Podívejte se na náš nově spuštěný web http://DocBook.cz ------------------------------------------------------------------