[I18n-sig] i18n : Tkinter app and iso-8859-1 ?
francois schnell
francois.schnell at gmail.com
Sun Mar 26 23:51:06 CEST 2006
Hello all,
I have a Python script (with Tkinter GUI) I've i18n with gettext (the script
is in English and my po -> mo file in French 'fr') :
In my script:
---
localedir= "locale"
gettext.install("liberlab-soft", localedir)
---
It works fine on french Windows but not on my Linux box (Ubuntu Breezy) :
when the script use the french .mo it displays unexcepted chararcters where
I had my french accents :(
Before using msgfmt.py on my po file I was carefull to indicate the french
charset in the " ":
---
...
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: FRANCE\n"
---
but I'm note sure if msgfmt use this charset declaration.
I've also tried later to add an encoding declaration in my script (first
line) but that didn't help either:
# -*- coding: iso-8859-1 -*-
I've also tried this without success (except I've got other strange chars
which are the same whatever I put in "encoding" var):
localedir= "locale"
encoding= "iso-8859-1"
gettext.install("liberlab-soft", localedir, encoding)
The script (liberlab-soft.py) and the french po and mo file :
http://cvs.sourceforge.net/viewcvs.py/liberlab/liberlab-software/
Thanks for help, hints ...please, s'il vous plait :)
francois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/i18n-sig/attachments/20060326/17807540/attachment.html
More information about the I18n-sig
mailing list