|
From: Adam C. <ad...@ch...> - 2002-07-20 17:03:56
|
On Sat, 20 Jul 2002 10:04:57 -0400 David Goodger
<go...@us...> wrote:
[swedish mappings]
> Thanks Adam. But Python modules should be 7-bit clean; please convert the
> accented characters to "\uXXXX" Unicode escapes (and the strings to "u''"
> Unicode strings). 8-bit strings will work as long as the modules aren't
> transfered across platforms, but they'll fail if poorly converted. Best to
> leave nothing to chance.
Have to say that this is the first project I've seen to require that; most
other projects assume iso-8859-1 if nothing else is specified. Anyway, I'll
fix this ASAP.
Hmmm... I guess the below is a good method for escaping the string?
>>> "aweraäöå".decode('iso-8859-1')
u'awera\xe4\xf6\xe5'
I wonder what the difference between \xXX and \uXXXX is..?
---
Adam Chodorowski <ad...@ch...>
Linux is Only Free
If Your Time is Worthless
|