[I18n-sig] XML and UTF-16

M.-A. Lemburg mal@lemburg.com
Fri, 01 Jun 2001 10:13:19 +0200


Paul Prescod wrote:
> 
> "M.-A. Lemburg" wrote:
> >
> >...
> >
> > Perhaps we should have some smart auto-detection API somewhere
> > which does this automagically ?! Something like
> >
> >         guess_xml_encoding(data) -> encoding string
> >
> > It could work by looking at the first 256 bytes of the data
> > string and then apply all the tricks needed to extract the
> > encoding information (or default to UTF-8 if no such information
> > is given).
> 
> This might help:
> 
> http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52257
> 
> I think Lars has a version too...

Could you clarify what the licensing conditions are for using
code from your recipe collection ?

Thanks,
-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/