Bugs item #1697943, was opened at 2007-04-10 22:58
Message generated for change (Comment added) made by cito
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697943&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Demos and Tools
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christoph Zwerschke (cito)
Assigned to: Martin v. Löwis (loewis)
Summary: msgfmt cannot cope with BOM

Initial Comment:
If a .po file has a BOM (byte order mark) at the beginning, as is often the 
case for utf-8 files created on Windows, msgfmt.py complines about a syntax 
error.

The attached patch fixes this problem.

----------------------------------------------------------------------

>Comment By: Christoph Zwerschke (cito)
Date: 2007-04-12 11:10

Message:
Logged In: YES 
user_id=193957
Originator: YES

It may well be that GNU gettext also chokes on a BOM, because they aren't
used under Linux. But I think as a Python tool it should be more
Windows-tolerant. The annoying thing is that you get a syntax error, but
everything looks right because the BOM is usually invisible. Such error
messages are really frustrating. Either the BOM should be silently ignored
(as in the patch) or the users should get a friendly error message asking
them to save the file without BOM. If GNU behaves badly to Windows users,
that's not an excuse to do the same. They are already suffering enough
because of their (or their bosses') bad choice of OS ;-)



----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2007-04-12 00:13

Message:
Logged In: YES 
user_id=21627
Originator: NO

It's my code, but I will need to establish first whether it's a bug. That
depends on what the PO specification says, and, if is it silent on the
matter, what GNU gettext does.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2007-04-11 18:07

Message:
Logged In: YES 
user_id=80475
Originator: NO

Martin, is this your code?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697943&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to