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

>For instance it will attempt decoding from utf-8 with replacing decoding errors with question marks.

Please don't do this. Replacing with question mark is a lossy transformation. If you use a lossless transformation, a knowledgeable user of your program will be able to reverse the garbling, in their head, or using a tool. Consider åäö, the result of interpreting utf8 åäö as latin1. You could find both the reason and solution by googling on it.



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

Search: