Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/String-length/Python/string-length-3.py
Normal file
6
Task/String-length/Python/string-length-3.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
s = u"møøse"
|
||||
assert len(s) == 5
|
||||
assert len(s.encode('UTF-8')) == 7
|
||||
assert len(s.encode('UTF-16-BE')) == 10 # There are 3 different UTF-16 encodings: LE and BE are little endian and big endian respectively, the third one (without suffix) adds 2 extra leading bytes: the byte-order mark (BOM).
|
||||
Loading…
Add table
Add a link
Reference in a new issue