On Sat, Mar 12, 2005 at 06:20:46PM +0100, Sebastian Hilbert wrote: > Karsten enlighted me to set LANG=en to avoid unicode problems This is bad.
It seems what is happening is gettext is returning an iso-latin-1
string, as a normal Python string, the wxpython code
is doing .decode ('ascii'), which chokes on the umlaut.
The answer is to first do string.decode ('latin_1'), which
returns a Unicode string that wxPython-unicode can handle.
How can we do this while keeping our code 2.4/2.5 agnostic?
Perhaps a function in gmI18N.py : switch_to_unicode (), called
by GUI code when it realises its running on a unicode system,
and makes _ () return unicode strings by either configuring
gettext to use Unicode or adding a wrapper to _ ()
to call .decode ('latin_1')
The first is better, b/c the latterlocks us to latin-1 of course,
but I don't know if that means the translations have to be redone in
Unicode.
(I confess I don't know much about gettext)
It's worth pointing out this has come to a head because
distros aren't including 2.4 anymore.
Ian
> --
> Sebastian Hilbert
> Leipzig / Germany
> [www.openmed.org] -> PGP welcome, HTML ->/dev/null
> ICQ: 86 07 67 86 -> No files, no URL's
> VoIP: callto://[EMAIL PROTECTED]
> My OS: Suse Linux. Geek by Nature, Linux by Choice
> _______________________________________________
> Gnumed-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/gnumed-devel
pgpqQDhM0nhz3.pgp
Description: PGP signature
_______________________________________________ Gnumed-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnumed-devel
