[XML-SIG] Re: HTML<->UTF-8 'codec'?
M.-A. Lemburg
mal@lemburg.com
Fri, 08 Mar 2002 16:23:15 +0100
David Primmer wrote:
>
> Thank you! Yes. I didn't know you needed to use codecs.open() and I
> figured it had something to do with the serialization. Looks like I have
> to use codecs.open() or tack on .decode() everywhere I've used plain
> open() calls.
>
> I don't remember seeing that function used anywhere. This seems like
> pretty obscure stuff. I got the defaultencoding setting from an XML
> tutorial that noted it as a solution for toxml() barfing all the time.
>
> I worry that I won't have much support if I build my app around Unicode
> data. Are there many examples of its use? Any info on Unicode in python
> other than the standard docs? I could only find this:
>
> http://www.reportlab.com/i18n/python_unicode_tutorial.html
You should take a look at the Unicode PEP 100 and the source code
in the encodings package if you're interested in writing codecs.
Other examples can be found in the python-codecs project on
SourceForge. Tamito's JapaneseCodecs also provide a good intro-
duction.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/