From 267f8444ec6a376360e75e45afb8552f2e57d893 Mon Sep 17 00:00:00 2001 From: poing Date: Wed, 7 Sep 2016 18:01:28 +0900 Subject: [PATCH] Fixing unicode --- asterisk/agi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/asterisk/agi.py b/asterisk/agi.py index 4880afa..a6c1013 100755 --- a/asterisk/agi.py +++ b/asterisk/agi.py @@ -1,5 +1,6 @@ -#!/usr/bin/env python2 +#! /usr/bin/env python # -*- coding: utf-8 -*- +# vim:fenc=utf-8 """ .. module:: agi :synopsis: This module contains functions and classes to implment AGI scripts in python. @@ -26,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