On 12/02/2003 09:05 AM, Victor spång arthursson wrote:
I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first.
I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt matter if i type the foreign characters in by myself hardcoded in the PHP-script, or if I get them from external XML-files, or if I get them directly from the database.
utf8_encode() helps a bit, in the way that it makes the script work at least, but instead of the string "mængde" PHP outputs "mængde"…
Is there any way to get XML to work together with PHP, or should I simply resign and try with ASP instead?
You just need to use the proper input/output encodings. PHP function usually assume iso-8859-1 . I do not know if that is the encoding that your idiom uses.
Anyway, you may want to try these XML parser and writer classes:
http://www.phpclasses.org/xmlparser
http://www.phpclasses.org/xmlwriter
--
Regards, Manuel Lemos
Free ready to use OOP components written in PHP http://www.phpclasses.org/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php