note 50470 modified in ref.simplexml by derick

From: Date: Thu, 13 Oct 2005 13:45:39 +0000
Subject: note 50470 modified in ref.simplexml by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96953@lists.php.net to get a copy of this message
Note that SimpleXML expects to both read and output XML in UTF-8 encoding. You'll need to add a line such as this at the top of your input XML file if it isn't saved in UTF-8 (adjust to whatever encoding used): <?xml version="1.0" encoding="ISO-8859-1" ?> On the output side of things, if you're not serving/handling UTF-8, you'll need to use utf8_decode() [red. but that will only work for ISO-8859-1, not other encodings]. Common mistake: http://bugs.php.net/bug.php?id=28154 --was-- Note that SimpleXML expects to both read and output XML in UTF-8 encoding. You'll need to add a line such as this at the top of your input XML file if it isn't saved in UTF-8 (adjust to whatever encoding used): <?xml version="1.0" encoding="ISO-8859-1" ?> On the output side of things, if you're not serving/handling UTF-8, you'll need to use utf8_decode(). Common mistake: http://bugs.php.net/bug.php?id=28154 http://php.net/manual/en/ref.simplexml.php

« previous php.notes (#96953) next »