[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Gettexted messages encoding with Python 2.5
From: |
Han-Wen Nienhuys |
Subject: |
Re: [PATCH] Gettexted messages encoding with Python 2.5 |
Date: |
Mon, 2 Jul 2007 21:58:49 -0300 |
2007/7/2, John Mandereau <address@hidden>:
To fix this, we must use ugettext instead of gettext in lilylib.py.
Unfortunately, this fix implies that each gettexted string must be
converted from Python internal Unicode to stdout/stderr encoding before
being written to stdout/stderr.
May I commit and push the following patch, that intends to solve all
problems above?
I'm not aware of all the issues, but I believe your story. However,
would it be better to define a encoded_write or similar, ie.
def encoded_write(f, s):
f.write (s.encode (f.encoding))
and perhaps
def log(s):
encoded_write(sys.stderr, s)
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen