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

>using .decode requires that your input has a valid, known encoding which is rarely true in the real world of messy data.

How else would you decode a string without knowing its encoding? You can either guess (and risk invalid result/decode errors) or store this information somewhere. This is universal and true in every language. In most cases today people choose to guess utf-8.



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

Search: