These still are some problem, I have tested on debian and windows xp.<br><br>These are some place in ipython, using something like: <br><br>1. str(s1) will fail if s1 is unicode and can't be encoded using ascii
<br>2. '%s, %s' % (s1, s2) will fail if s1 is str and can't be decoded using ascii, and s2 is unicode<br><br>I found a easy way to fix is:<br><br>import sys<br>sys.setappdefaultencoding(sys.stdout.encoding
)
<br><br>Now python will use sys.stdout.encoding(instead of ascii) to convert string between str and unicode.<br><br>So these is not needed to use string.decode(encoding), unicode_string.encode(encoding<div id="mb_3">), just can use str(unicode_string) or unicode(string).
<br><br>So the above change can be:<br>code = self.compile(str(source),filename,symbol)</div>