From e4325c9be55be8a127faac80019f7fff30478059 Mon Sep 17 00:00:00 2001 From: poing Date: Thu, 8 Sep 2016 11:01:57 +0900 Subject: [PATCH] Focus on UTF8 --- asterisk/agi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asterisk/agi.py b/asterisk/agi.py index 183761c..033f665 100755 --- a/asterisk/agi.py +++ b/asterisk/agi.py @@ -27,6 +27,10 @@ import sys import pprint import re import signal +#import sys +reload(sys) +sys.setdefaultencoding("utf-8") + DEFAULT_TIMEOUT = 2000 # 2sec timeout used as default for functions that take timeouts DEFAULT_RECORD = 20000 # 20sec record time