[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug 323232] UTF-8 arrows mangled (fwd)
From: |
Bruno Haible |
Subject: |
Re: [Bug 323232] UTF-8 arrows mangled (fwd) |
Date: |
Fri, 9 Dec 2005 15:59:13 +0100 |
User-agent: |
KMail/1.5 |
Reinout van Schouwen wrote:
> Could you please take a look at the bug report below and confirm if it
> is indeed a gettext bug? Thanks very much.
> ...
> In gettext 14.5 gettext-tools/src/x-python.c says at line 213
> /* We assume the program source is in ISO-8859-1 (for consistency with
> Python's \ooo and \xnn syntax inside strings), but we produce a POT
> file in UTF-8 encoding. */
>
> This is plainly wrong, and the bug is in xgettext program with Python source
> code.
At the time x-python.c was written, this was not a bug, because at that
time, Python source code was really ISO-8859-1 only.
Now, with PEP 0263, this is not the case any more. gettext-0.15 will
support this proposal, i.e. interpret a comment that is as specified
in http://www.python.org/peps/pep-0263.html.
Stepan Kasal wrote:
> This contradicts the documentation which says (in the paragraph describing
> --from-code):
> "Note that Python, Tcl, and Glade input files are always assumed
> to be in UTF-8, [...]"
This is a documentation bug: Python source was being interpreted as
ISO-8859-1, not UTF-8. Will be fixed in gettext-0.15 as well.
So you don't need to wait for gettext-0.15's release, here is a workaround:
If you use the usual Python notation (\u2192 or
\N{RIGHTWARDS ARROW} ), xgettext 0.14.5 will extract the arrow nicely and
produce a POT file in UTF-8 encoding.
Bruno