Re: [PHP-XML-DEV] generating xml with chars like (õäöü)
[email protected] (Christian Stocker) Tue, 13 Jul 2004 14:34:17 +0200
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi if you are inserting text with for example createTextNode(), then the input has to be UTF-8. Always. You have to transform that in PHP before you insert the code (loading xml documents from files or strings with $dom->load() and $dom->loadXML() does not have this limitation, there it's the encoding attribute, which counts) This is for both PHP 4 and PHP 5. Furthermore, this is a list for developing the xml support in PHP, not for developing _with_ XML in PHP... php-general is maybe the more appropriate place for such questions. chregu On 13.7.2004 14:24 Uhr, jux wrote: > Hi > > I found another problem in that kind of situation. Now when i create xml > data with DOM, I have character ecoding problem. > Right now my xml starts like so: > <?xml version="1.0" encoding="ISO-8859-1"?> > > But i must use estonian language characters like: õ ä ö ü > So i think UTF-8 charset should do fine here but xml DOM had some kind > of problems when encoding was utf-8. > > So what do u suggest me to do. Use some kind of encoding or maybe use > somekind of character converting functions in PHP to read/write xml files? > > > PS. and still my xml data comes in one line:( > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [email protected] | gnupg-keyid 0x5CE1DECB