[Expat-discuss] Converting UT8 to Latin-1

Fred L. Drake, Jr. fdrake@acm.org
Tue Apr 9 06:36:09 2002


Axel Kittenberger writes:
 > Although this is in high danger to be a FAQ I didn't find it:
 > 
 > Does libexpat provide a convinient function to convert the UTF8 Strings 
 > passed to the Call-backs to latin-1 ? 

No, it doesn't, and it probably shouldn't.  There's nothing about the
conversion that's specific to Expat.

There are a number of libraries that include utilities like this.  I'd
take a look at recode (there's a library version of this these days)
and ICU ("IBM Components for Unicode").  There are probably a number
of others as well, but you'll need to look around with your technical
and licensing requirements in mind.

If anyone would like to contribute a list of such libraries, I'll be
glad to add pointers to the website at expat.sourceforge.net, but I
don't have time to undertake that myself.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation