[Zope] Swedish characters and XMLDocument-1.0a4

Alexander Staubo alex@mop.no
Mon, 20 Dec 1999 14:51:48 +0100


Looks like the XML generation code doesn't like non-UTF encodings, and
converts any non-UTF characters back to UTF-8 (which is what the ugly
noise you quoted is). This isn't entirely _incorrect_ -- technically,
the document's contents is still the same as what you put in -- but it
certainly isn't _right_.

Alexander Staubo
mailto:alex@mop.no
http://www.mop.no/~alex/


> -----Original Message-----
> From: magnus@vuab.net [mailto:magnus@vuab.net]
> Sent: Monday, December 20, 1999 2:39 PM
> To: Alexander Staubo
> Cc: johanc@torped.se; amos@digicool.com; zope@zope.org
> Subject: Re: [Zope] Swedish characters and XMLDocument-1.0a4
>
>
>
> > I'm not much of an expert on character sets, but the
> default character
> > encoding in XML is UTF-8, not ISO 8859 as with HTML.
> Therefore, entering
> > ISO characters will not translate correctly, and this might
> account for
> > your problems.
> >
> > To specify that the document contents is encoded in ISO
> 8859-1 (ie., ISO
> > Latin 1), modify the document heading to say:
> >
> >         <?xml version="1.0" encoding="ISO-8859-1"?>
>
> Well... I add that into the document:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <faq>
>   <entry>
>     <test>Långt svårt öppningshål</test>
>   </entry>
> </faq>
>
>
> Then I hit "Change", and the saved version will look like this:
>
> <?xml version="1.0"?>
> <faq>
>   <entry>
>     <test>Långt och svårt öppningshål</test>
>   </entry>
> </faq>
>
> Encoding is removed, and I cant say the text is what I want
> it to be :-P
>
> Time to buy a XML-book... or maybe it is a bug? I dont know.
>
> /Magnus Heino
>