擅长:python、mysql、java
<p>为了避免在执行<code>str(table)</code>时发生UnicodeEncodeError,可以使用<code>table.encode('ascii', errors='ignore')</code>。这将删除所有不能编码为ASCII的字符,根据您的数据,这些字符可能是不需要的。在</p>
<p>如果您确保<code>table</code>和参数都是unicode字符串,例如<code>table.replace(u'\0152', u'')</code>,那么<code>replace</code>也可以工作。在</p>