Re: Re: generating

From: Date: Wed, 14 Jul 2004 09:19:33 +0000
Subject: Re: Re: generating
References: 1 2 3 4 5 6  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-423@lists.php.net to get a copy of this message
Hi ok. we come nearer to the conclusion... dump_file exports the XML file per default as UTF-8 (IIRC) It doesn't look like, there's an option to change that, but with dump_mem it's possible. See http://ch.php.net/manual/en/function.domdocument-dump-mem.php for details. the same goes btw for print $node->get_content() (and similar methods) they always return utf-8. You have to use utf8_decode() if you want iso-8859-1 on that hope that helps... and for the next time put an example online somewhere. It's much easier if we actually see, what you want to do.... chregu On 14.7.2004 11:10 Uhr, jux wrote:
OK the text editor i use is SciTE, so i think it does fine. Here is the example, what happends. After editing my XML file, it is like that: <?xml version="1.0" encoding="ISO-8859-1"?> <list> <element nr="1"> <model>õ</model> </element> </list> ok ... in that list are many elements. If i go to that web page, first i see table of the elements that is parsed with SAX parser. The "õ" on model column is displayed fine. Now i have option to view only one element, in our case <element nr="1">. This is parsed with DOM XML. There instead of displayng "õ" - it diplayes "õ". OK but the second problem happens when i create new elements to xml file with DOM XML by submitting a form from the web and if i put õäöü chars into textbox then that error accours (and in web my charset is ISO-8859-1): Warning: dump_file(): output conversion failed due to conv error in line ### Warning: dump_file(): Bytes: 0xF5 0x32 0x3C 0x2F in line ### Warning: dump_file(): encoder error in line ### (where line ### is the same line nr) So ... hope u can help me ... thnx
-- 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 | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

« previous php.xml.dev (#423) next »