Eksplisitt konvertering av input til unicode.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2010-05-16 14:15:36 +00:00
parent 64dcb9ecf5
commit af9e8893df
2 changed files with 3 additions and 1 deletions

View File

@ -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'

View File

@ -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()