擅长:python、mysql、java
<p>Python正试图从unicode字符串到ASCII编码字符串进行隐式类型转换。从您发布的内容中很难判断这是在哪里发生的,但是最好确保您始终使用unicode。为此,您需要在所有字符串前面添加一个<code>u</code>,例如:<code>u"A unicode string"</code>,并始终使用<code>unicode()</code>,而不是{<cd4>}。在</p>
<p>Unicode常常被英语程序员和教程忽视,因为在英语中,您可以通过使用ASCII编码字符来逃避惩罚。不幸的是,世界其他地方也因此而受苦,因为大多数语言使用ASCII不支持的字符。查看Python <a href="http://docs.python.org/howto/unicode.html" rel="nofollow">Unicode HOWTO</a>可以得到一些关于Unicode良好编程实践的指导。在</p>
<p>{a2}我发现这篇文章也很有用。在</p>