Merge 13541 from trunk: set explicit encoding for database i18n input
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Jul 2009 02:14:28 +0000 (02:14 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Jul 2009 02:14:28 +0000 (02:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@13542 dcc99617-32d9-48b4-a31d-7c20da2025e4

build/i18n/scripts/db-seed-i18n.py

index fc7b8b6..d8bd36f 100755 (executable)
@@ -18,6 +18,7 @@ Requires polib from http://polib.googlecode.com
 # GNU General Public License for more details.
 
 import basel10n
+import codecs
 import optparse
 import polib
 import re
@@ -59,7 +60,7 @@ class SQL(basel10n.BaseL10N):
         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