From: Brett Parker Date: Thu, 9 Jul 2009 14:09:24 +0000 (+0100) Subject: Actually encode to the terminals locale, if we can. X-Git-Url: https://git.sommitrealweird.co.uk/curses-crossword.git/commitdiff_plain/9b5ae442fe161599570d734743bb8e4636226fb1 Actually encode to the terminals locale, if we can. --- diff --git a/curses-crossword.py b/curses-crossword.py index 19ee754..6d8791a 100644 --- a/curses-crossword.py +++ b/curses-crossword.py @@ -84,13 +84,13 @@ def parsecrossword(crossworddata): parts = line.split() question_number = int(parts[0]) clue = " ".join(parts[1:]) - crossword["across"][int(question_number)] = clue.encode('utf-8') + crossword["across"][int(question_number)] = clue.encode(code) if indown: if line != "": parts = line.split() question_number = int(parts[0]) clue = " ".join(parts[1:]) - crossword["down"][int(question_number)] = clue.encode('utf-8') + crossword["down"][int(question_number)] = clue.encode(code) num_cols = len(crossword["grid"][0]) num_rows = len(crossword["grid"])