From: dbs Date: Thu, 9 Jul 2009 02:14:50 +0000 (+0000) Subject: Merge 13541 from trunk: set explicit encoding for database i18n input X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cfced5e24c4c043f9b56533f9d04ec5a5fa90f45;p=Evergreen.git Merge 13541 from trunk: set explicit encoding for database i18n input git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@13543 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/build/i18n/scripts/db-seed-i18n.py b/build/i18n/scripts/db-seed-i18n.py index fc7b8b6f7e..d8bd36febe 100755 --- a/build/i18n/scripts/db-seed-i18n.py +++ b/build/i18n/scripts/db-seed-i18n.py @@ -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