Re: [xml] encoding



On Mon, Apr 02, 2001 at 09:22:38PM +0200, Thomas Dold wrote:
Another two question to the encoding:

First:
In the following program I set the property "town" which the value
"München".
Before I call the xmlSetProp-Function, I transform the value-string with the
function isolat1ToUTF8.
After setting the property, I read it again with the function xmlGetProp.
The returned string is in UTF-8, so I use the function UTF8Toisolat1.
But when I then print the string, I only get "Mnchen".

Then I save the document in a file (xmlSaveFile), and parse it again
(xmlParseFile).
Then I read once more the property on the way described above, but now I
get the strin "München".

And second:
As you can see, I try to save the file in different encodings. Only the
saving
without encoding has no error, and so it's in UTF-8 (or not?).
Why do I get the error, that the document is not in UTF-8, when I try to
save in
in another encoding?
[...]
Save in UTF8:  OK
xmlSaveFileEnc: document not in UTF8
Save in ISO-Latin-1:  not OK, rc=-1
xmlSaveFileEnc: document not in UTF8
Save in ISO-8859-1:  not OK, rc=-1

  Bug fixed
this was in xmlNewDoc(),

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]