From: dbs Date: Thu, 9 Jul 2009 02:13:05 +0000 (+0000) Subject: Reproduced miker's problem building i18n on a clean Debian Lenny system. codecs,... X-Git-Tag: sprint4-merge-nov22~9715 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cb4669797f9ed5a2095e11975f9fe9c2df8d08b0;p=working%2FEvergreen.git Reproduced miker's problem building i18n on a clean Debian Lenny system. codecs, to the rescue! git-svn-id: svn://svn.open-ils.org/ILS/trunk@13541 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