i18n : Tkinter app and iso-8859-1 ?
"francois schnell" <[email protected]> Sun, 26 Mar 2006 23:51:06 +0200
| Newsgroups | gmane.comp.python.internationalization |
|---|---|
| Message-ID | <[email protected]> |
--===============1950882167==
Content-Type: multipart/alternative;
boundary="----=_Part_9564_21177170.1143409866899"
------=_Part_9564_21177170.1143409866899
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hello all,
I have a Python script (with Tkinter GUI) I've i18n with gettext (the scrip=
t
is in English and my po -> mo file in French 'fr') :
In my script:
---
localedir=3D "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=3Diso-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=3D "locale"
encoding=3D "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
------=_Part_9564_21177170.1143409866899
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hello all,<br>
<br>
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') :<br>
<br>
In my script:<br>
---<br>
localedir=3D "locale"<br>
gettext.install("liberlab-soft", localedir)<br>
---<br>
<br>
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 :(<br>
<br>
Before using msgfmt.py on my po file I was carefull to indicate the french =
charset in the " ":<br>
---<br>
...<br>
<br>
"MIME-Version: 1.0\n"<br>
"Content-Type: text/plain; charset=3Diso-8859-1\n"<br>
"Content-Transfer-Encoding: 8bit\n"<br>
"Generated-By: pygettext.py 1.5\n"<br>
"X-Poedit-Language: French\n"<br>
"X-Poedit-Country: FRANCE\n"<br>
---<br>
but I'm note sure if msgfmt use this charset declaration.<br>
<br>
I've also tried later to add an encoding declaration in my script (fi=
rst line) but that didn't help either:<br>
# -*- coding: iso-8859-1 -*-<br>
<br>
I've also tried this without success (except I've got other strange chars w=
hich are the same whatever I put in "encoding" var):<br>
<br>
localedir=3D "locale"<br>
encoding=3D "iso-8859-1"<br>
gettext.install("liberlab-soft", localedir, encoding)<br>
<br>
The script (liberlab-soft.py) and the french po and mo file : <a href=3D"ht=
tp://cvs.sourceforge.net/viewcvs.py/liberlab/liberlab-software/">http://cvs=
.sourceforge.net/viewcvs.py/liberlab/liberlab-software/</a><br>
<br>
Thanks for help, hints ...please, s'il vous plait :)<br>
<br>
francois<br>
------=_Part_9564_21177170.1143409866899--
--===============1950882167==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
I18n-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/i18n-sig
--===============1950882167==--