[open-ils-commits] r13545 - branches/rel_1_4_0/build/i18n/scripts (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 8 22:15:39 EDT 2009


Author: dbs
Date: 2009-07-08 22:15:37 -0400 (Wed, 08 Jul 2009)
New Revision: 13545

Modified:
   branches/rel_1_4_0/build/i18n/scripts/db-seed-i18n.py
Log:
Merge 13541 from trunk: set explicit encoding for database i18n input

Modified: branches/rel_1_4_0/build/i18n/scripts/db-seed-i18n.py
===================================================================
--- branches/rel_1_4_0/build/i18n/scripts/db-seed-i18n.py	2009-07-09 02:15:09 UTC (rev 13544)
+++ branches/rel_1_4_0/build/i18n/scripts/db-seed-i18n.py	2009-07-09 02:15:37 UTC (rev 13545)
@@ -18,6 +18,7 @@
 # GNU General Public License for more details.
 
 import basel10n
+import codecs
 import optparse
 import polib
 import re
@@ -59,7 +60,7 @@
         serts = dict()
 
         # Iterate through the source SQL grabbing table names and l10n strings
-        sourcefile = open(source)
+        sourcefile = codecs.open(source, encoding='utf-8')
         for line in sourcefile:
             try:
                 num = num + 1



More information about the open-ils-commits mailing list