Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pieter
on Feb 8, 2011
|
parent
|
context
|
favorite
| on:
UTF-8 good, UTF-16 bad
It leaks through in some places. For example, len(u'\U0001D310') (from the Tai Xuan Jing Symbols) returns 1 on 32-bit wide pythons, and returns 2 on the default 16-bit wide builds.
Locke1689
on Feb 8, 2011
[–]
Nope, that's the correct behavior. Run len on the UTF encode and you'll get the expected result.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: