擅长:python、mysql、java
<p>试试看</p>
<pre><code>## -*- coding: UTF-8 -*-
</code></pre>
<p>或者</p>
<pre><code>## -*- coding: latin-1 -*-
</code></pre>
<p>或者</p>
<pre><code>## -*- coding: cp1252 -*-
</code></pre>
<p>取决于你真正需要什么。最后两个类似,除了:</p>
<blockquote>
<p>The Windows-1252 codepage coincides with ISO-8859-1 for all codes except the range 128 to 159 (hex 80 to 9F), where the little-used C1 controls are replaced with additional characters. Windows-28591 is the actual ISO-8859-1 codepage.</p>
</blockquote>
<p>其中<code>ISO-8859-1</code>是<code>latin-1</code>的正式名称。</p>