Re: DOMXML and encodings (php4.1.2, libxml2.4.16)

From: Date: Sun, 24 Mar 2002 15:55:54 +0000
Subject: Re: DOMXML and encodings (php4.1.2, libxml2.4.16)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89913@lists.php.net to get a copy of this message
Hi Lucky wrote:
Hello all, I have a little problem with encodings with libxml2 resp. domxml in php. In our site we're storing articles as XML, ISO-8859-1 encoded (indicated in xml-header). Libxml2 is doing all the internal processing in UTF-8, so the article gets translated to UTF-8. But when I do an xmltree() on the article, all output of libxml is in UTF-8, too, and it's really ugly to read german umlauts in UTF-8 in a browser displaying all as ISO-8859-1. Is there any way (other than manually do utf8_decode on every part of the output, which is _very_ ugly and annoying) to tell php or libxml to output things in UTF-8?
No, unfortunately there isn't. Here's a quote from the libxml site (http://xmlsoft.org/encoding.html): "... basically the I18N (internationalization) support get triggered only during I/O operation, i.e. when reading a document or saving one" Regards, Stefan Livieratos -- ICS Plus Internet Consulting + Services ============================== Aeussere Brucker Str. 51 D-91058 Erlangen Germany ============================== Tel : +49 9131 127733 Fax : +49 9131 127744 E-mail : info@icsplus.de Web : http://www.icsplus.de ==============================

« previous php.general (#89913) next »