From 0b6138e09562f445c258ff6152e04df84c99b0fb Mon Sep 17 00:00:00 2001 From: davi_zucon Date: Tue, 30 Aug 2016 10:01:59 -0300 Subject: [PATCH] Avoid problems in str.format() with char accents --- chatterbot/utils/read_input.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chatterbot/utils/read_input.py b/chatterbot/utils/read_input.py index 28b5433e0..91324dcbb 100644 --- a/chatterbot/utils/read_input.py +++ b/chatterbot/utils/read_input.py @@ -10,4 +10,8 @@ def input_function(): user_input = str(raw_input()) else: user_input = input() + + if user_input: + user_input = user_input.decode('utf-8') + return user_input