gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] screenshots wx2.5.2


From: Ian Haywood
Subject: Re: [Gnumed-devel] screenshots wx2.5.2
Date: Sun, 13 Mar 2005 04:19:43 -0500
User-agent: Mutt/1.3.28i

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://address@hidden
> My OS: Suse Linux. Geek by Nature, Linux by Choice



> _______________________________________________
> Gnumed-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnumed-devel

Attachment: pgpNAjN77Yybc.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]