aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2016-10-02 00:34:28 +0200
committerPetter Reinholdtsen <pere@hungry.com>2016-10-02 00:34:28 +0200
commit5434cd699e5554ec7fe1c45b71449635706ccdc2 (patch)
treee60ca1b7b336f14ddec7bdbe2a8757a37c35375d
parentd3a1ec1b4ba87dae5dc4fe70278ad5ec5482b4e8 (diff)
Fix problem with non-ascii output to the log.
-rwxr-xr-xrun-scraper4
1 files changed, 4 insertions, 0 deletions
diff --git a/run-scraper b/run-scraper
index bed4eab..e264cd0 100755
--- a/run-scraper
+++ b/run-scraper
@@ -12,4 +12,8 @@ export PYTHONPATH=`pwd`/testlib/scraperwiki-python:`pwd`/testlib/lazycache
SCRAPERWIKI_DATABASE_NAME=sqlite:///$file.sqlite
export SCRAPERWIKI_DATABASE_NAME
+# Tell python to use UTF-8 on stdout
+PYTHONIOENCODING=UTF-8
+export PYTHONIOENCODING
+
(cd data ; python $topdir/scrapersources/$file)