消息 [76353]
Python 3.0 rc3 on Windows (Server 2003 US English)
The code with a string including a non ascii character:
s = 'abçd'
print (s)
is returning correct result in console mode and when it's typed in the
IDLE Python Shell
But when executed from an IDLE editor window with Run/Run Module
it prints 5 characters instead of 4.
With more details, the code:
s = 'abçd'
print (s)
for i in range(len(s)):
print(hex(ord(s[i])),end=' ')
gives in console mode:
abçd
0x61 0x62 0xe7 0x64
but with Run/Run Module:
abçd
0x61 0x62 0xc3 0xa7 0x64 |
|
| 日期 |
用户 |
动作 |
参数 |
| 2008-11-24 18:16:50 | andre | 修改 | recipients:
+ andre |
| 2008-11-24 18:16:49 | andre | 修改 | messageid: <1227550609.93.0.240511987484.issue4410@psf.upfronthosting.co.za> |
| 2008-11-24 18:16:49 | andre | 链接 | issue4410 messages |
| 2008-11-24 18:16:48 | andre | 创建 | |
|