On 01/28/2012 04:03 PM, Terry Reedy wrote:
> On 1/28/2012 2:58 PM, Michael Torrie wrote:
>> On 01/28/2012 12:21 AM, contro opinion wrote:
>> s='你好'
>>
>> On my computer, s is a byte string that contains the utf-8 formatted
>> encoding of 你好.
>
> On mine, s is a (unicode) string containing thos
On 1/28/2012 2:58 PM, Michael Torrie wrote:
On 01/28/2012 12:21 AM, contro opinion wrote:
s='你好'
On my computer, s is a byte string that contains the utf-8 formatted
encoding of 你好.
On mine, s is a (unicode) string containing those two characters. That
is because I pasted the above into IDL
On 01/28/2012 12:21 AM, contro opinion wrote:
s='你好'
On my computer, s is a byte string that contains the utf-8 formatted
encoding of 你好. This has nothing to do with python, though, and
everything to do with the line editor python's interpreter is doing. In
other words, the string is encode
>>> s='你好'
>>> t=u'你好'
>>> s
'\xc4\xe3\xba\xc3'
>>> t
u'\u4f60\u597d'
>>> t=us
Traceback (most recent call last):
File "", line 1, in
NameError: name 'us' is not defined
>>>
how can i use us to express u'你好'??
can i add someting in us to express u'你好'??
--
http://mail.python.org/mailman/l