parser as utf
This commit is contained in:
2
abot.py
2
abot.py
@@ -8,7 +8,7 @@ import sqlite3
|
||||
|
||||
|
||||
DATABASE = os.getenv('DATABASE', 'abot.sqlite') # database file
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
QUESTIONS = os.getenv('QUESTIONS', 'questions') # path to questions
|
||||
GIT_COMMIT = os.getenv('GIT_COMMIT', False)
|
||||
|
||||
|
||||
2
utils.py
2
utils.py
@@ -166,7 +166,7 @@ def parse_form(key):
|
||||
key = secure_filename(key)
|
||||
try:
|
||||
current_question = 0
|
||||
with open(os.path.join(app.config['QUESTIONS'], key + ".txt"), "rt") as fp:
|
||||
with open(os.path.join(app.config['QUESTIONS'], key + ".txt"), "rt", encoding = "UTF-8") as fp:
|
||||
for row in fp:
|
||||
if row.strip() == "":
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user