The method "domxml_new_doc" get only one parameter of the xml version.
How do I set the encoding?
http://www.php.net/manual/en/function.d ... ew-doc.php
How do I add encoding to DOM XML in PHP4?
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
from a comment in the manual: libxml uses "UTF-8" internal encoding
Use mb_convert_encoding() on your node contents to make them UTF-8 as well
(I read somewhere that mb_convert_encoding() is faster than utf8_encode()...)
Use mb_convert_encoding() on your node contents to make them UTF-8 as well
(I read somewhere that mb_convert_encoding() is faster than utf8_encode()...)
I want UTF-8 is not the problem.
But I also want that it will add in the XML output:
But I also want that it will add in the XML output:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK