HN2new | past | comments | ask | show | jobs | submitlogin

Yes it is hard. Instead of code points, humans usually handle text by graphemes, which have an arbitrary length in edge cases [0] no matter what encoding is used. An O(1) solution for graphemes would be an array of pointers to grapheme objects, which is slower and more memory hungry than necessary in most cases.

[0] http://stackoverflow.com/questions/6579844/how-does-zalgo-te...





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

Search: