From ef03259e0fa210a2e1b19efeb8989f3e0b0021c8 Mon Sep 17 00:00:00 2001 From: "Eevee (Lexy Munroe)" Date: Thu, 28 Jan 2016 01:40:08 -0800 Subject: [PATCH] Little better CLI handling of Unicode in Py2 --- pokedex/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pokedex/main.py b/pokedex/main.py index a8171a0..fc7dd31 100644 --- a/pokedex/main.py +++ b/pokedex/main.py @@ -1,6 +1,7 @@ # encoding: utf8 from __future__ import print_function +import locale from optparse import OptionParser import os import sys @@ -321,7 +322,7 @@ Dump options: Additionally, load and dump accept a list of table names (possibly with wildcards) and/or csv fileames as an argument list. -""".encode(sys.getdefaultencoding(), 'replace')) +""".encode(locale.getdefaultlocale()[1], 'replace')) sys.exit(0)