i18n : Tkinter app and iso-8859-1 ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

i18n : Tkinter app and iso-8859-1 ?

François Schnell-2
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

_______________________________________________
I18n-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/i18n-sig
Reply | Threaded
Open this post in threaded view
|

Re: i18n : Tkinter app and iso-8859-1 ?

François Schnell-2
Oops :

"The script (liberlab-soft.py) and the french po and mo file"
 EDIT: "The script (liberlab-soft-linux.py) and ...                     "

 
On 26/03/06, francois schnell <[hidden email]> wrote:
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 : <a href="http://cvs.sourceforge.net/viewcvs.py/liberlab/liberlab-software/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cvs.sourceforge.net/viewcvs.py/liberlab/liberlab-software/

Thanks for help, hints ...please, s'il vous plait  :)

francois


_______________________________________________
I18n-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/i18n-sig