Author: christian.heimes
Date: Sat Nov  3 01:53:47 2007
New Revision: 58820

Modified:
   python/branches/py3k-pep3137/Lib/gettext.py
Log:
Fixed gettext bug. Python's gettext module may still break if the GNU mo header 
contains non UTF-8 characters. Let's see if users are going to complain.

Modified: python/branches/py3k-pep3137/Lib/gettext.py
==============================================================================
--- python/branches/py3k-pep3137/Lib/gettext.py (original)
+++ python/branches/py3k-pep3137/Lib/gettext.py Sat Nov  3 01:53:47 2007
@@ -292,7 +292,7 @@
                 # Catalog description
                 lastk = k = None
                 for b_item in tmsg.split('\n'.encode("ascii")):
-                    item = str(b_item).strip()
+                    item = b_item.decode().strip()
                     if not item:
                         continue
                     if ':' in item:
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to