擅长:python、mysql、java
<p>使用unicode字符串:</p>
<pre><code>drostie@signy:~$ python
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "ŠČŽ"
ŠČŽ
>>> print "ŠČŽ".lower()
ŠČŽ
>>> print u"ŠČŽ".lower()
ščž
</code></pre>
<p>看到那一点了吗?这意味着它是作为<code>unicode</code>对象而不是<code>str</code>对象创建的。</p>