Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are no ASCII characters > 127. ASCII is a 7-bit encoding. That's why you run into cp1252 all the time if you work with Western European languages, such as English. cp1252 is an 8-bit superset of ASCII designed for Western European languages. I believe it's true that the first 256 unicode code points are actually cp1252, which implies that the first 128 code points correspond with ASCII.


Windows-1252 (cp1252) is similar to ISO-8859-1 (Latin-1), which is a subset of Unicode; both are a superset of ASCII. Windows-1252 however has a few characters mapped to different codepoints.


That's right, thank you.


> There are no ASCII characters > 127. ASCII is a 7-bit encoding.

Then there is no reason Python using ASCII to handle 8bit byte and yield error.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: