Re: i18n : Tkinter app and iso-8859-1 ?
"francois schnell" <[email protected]> Sun, 26 Mar 2006 23:58:08 +0200
| Newsgroups | gmane.comp.python.internationalization |
|---|---|
| Message-ID | <[email protected]> |
--===============1122304652== Content-Type: multipart/alternative; boundary="----=_Part_9616_15829173.1143410288403" ------=_Part_9616_15829173.1143410288403 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 <[email protected]> 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=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 whe= re > I had my french accents :( > > Before using msgfmt.py on my po file I was carefull to indicate the frenc= h > 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_9616_15829173.1143410288403 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Oops :<br> <br> "The script (liberlab-soft.py) and the french po and mo file"<br>= EDIT: "The script (liberlab-soft-linux.py) and ... = "<br> <br> <br> <div><span class=3D"gmail_quote">On 26/03/06, <b class=3D"gmail_sendername"= >francois schnell</b> <<a href=3D"mailto:[email protected]">fra= [email protected]</a>> wrote:</span><blockquote class=3D"gmail_quo= te" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt= 0.8ex; padding-left: 1ex;"> 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/" target=3D"= _blank" onclick=3D"return top.js.OpenExtLink(window,event,this)">http://cvs= .sourceforge.net/viewcvs.py/liberlab/liberlab-software/ </a><br> <br> Thanks for help, hints ...please, s'il vous plait :)<br><span class= =3D"sg"> <br> francois<br> </span></blockquote></div><br> ------=_Part_9616_15829173.1143410288403-- --===============1122304652== 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 --===============1122304652==--