Eksplisitt konvertering av input til unicode.
This commit is contained in:
parent
64dcb9ecf5
commit
af9e8893df
1
conf.py
1
conf.py
|
@ -2,3 +2,4 @@ db_url = 'sqlite:///data'
|
||||||
quit_allowed = True
|
quit_allowed = True
|
||||||
stop_allowed = False
|
stop_allowed = False
|
||||||
show_tracebacks = True
|
show_tracebacks = True
|
||||||
|
input_encoding = 'utf8'
|
||||||
|
|
|
@ -116,7 +116,8 @@ class Menu():
|
||||||
prompt = self.prompt
|
prompt = self.prompt
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
result = raw_input(safe_str(prompt))
|
result = unicode(raw_input(safe_str(prompt)),
|
||||||
|
conf.input_encoding)
|
||||||
except EOFError:
|
except EOFError:
|
||||||
print 'quit'
|
print 'quit'
|
||||||
self.exit_menu()
|
self.exit_menu()
|
||||||
|
|
Loading…
Reference in New Issue