[Zope] Swedish characters and XMLDocument-1.0a4

Johan Carlsson johanc@torped.se
Mon, 20 Dec 1999 14:40:11 +0100


The problem with swedish characters (and other non us-ascii characters)
is that XML-Documents (and probably the whole XML implementation in Zope)
defaults to UTF-8 (which Expat defaults to). UTF-8 is not compatibel with
ISO-8859-1 which Python uses (and there for Zope).

Using encoding definitions in the XML tag doesn't work in Zope XML-Document,
and probably not in any other part och Zope's XML implementations.

e.g.
<?xml version="1.0" encoding="iso-8859-1"?> fails in Zope's XML-Document.

With Expat on the other hand, the encoding works just fine.

XML Documents need to support the encoding attribute to be useful for
building anything other then English speeking websites.


Best regards,
Johan Carlsson



>
> FYI.
> As far as I have had time to test this,
> it seems to comedown to the pyexpat-parser.
>
> Tests with the pyexpattest.py scripts on
> the document breaks in exactly the sameway
> as reported by Magnus Heino.
>
> Best regards,
> Johan Carlsson
>
>
>
> > Hi.
> >
> > I just read Amos great article at
> > http://www.xml.com/pub/1999/12/zope/index.html
> >
> > I downloaded Sample.zexp and XMLDocument-1.0a4.tgz, and started to
> > create some sample pages of my own.
> >
> > Maybe I'm wrong, because I don't know much xml, but
> > XMLDocument-1.0a4.tgz seems to have problems handling the swedish
> > characters åäö.
> >
> > This document:
> >
> > <?xml version="1.0"?>
> > <faq>
> >   <entry>
> >     <test>Långt svårt öppningshål</test>
> >    </entry>
> > </faq>
> >
> > displays this error :
> >
> > XML Parsing Error: not well-formed at line 4
> >
> > when I try to save it in Zope.
> >
> > Change the text to "Långt svårt oppningshål" and it says:
> >
> > XML Parsing Error: mismatched tag at line 5
> >
> > "Långt svårt oppningshal" saves just ok...
> >
> > /Magnus Heino
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>