[Pythonmac-SIG] charset conversions

Jack Jansen jack@oratrix.nl
Fri, 08 Sep 2000 14:30:02 +0200


Recently, "tmk [microscript]" <tmk@microscript.be> said:
> Yo,
> 
> I'm looking into doing character set conversions in Python (e.g. from
> MacRoman to ISO-8859-1).
> 
> I was wondering if it already exists some stuff in this area. I've tried
> looking in the current library of python modules but I was unable to find
> something of interest.

Up until recently MacPython was confused: some parts of the system
thought it was iso-latin-1, others thought it was macroman. (And most parts 
didn't have a clue:-).

As of 2.0b1 (which is due in a few days) MacPython will have Unicode
support and converters between the various charsets. If you have
applications that do character conversion it would be very helpful if
you could try the unicode support and provide feedback on how well it
is working.

There is a potential downside to the Unicode support: there's a good
chance that strings (as in "text-strings", binary data is fine) that
have 8-bit characters in them will stop working in various areas such
as regular expressions. This is because the Python default character
encoding has been changed to "ascii". You should be able to set it to
either MacRoman or iso-latin-1 yourself, though.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm