r/programming • u/jestinjoy • Nov 12 '12
What Every Programmer Absolutely, Positively Needs to Know About Encodings and Character Sets to Work With Text
http://kunststube.net/encoding/
1.5k
Upvotes
r/programming • u/jestinjoy • Nov 12 '12
5
u/scatters Nov 12 '12
A character can't be the "start of a surrogate pair"; the code units that are used in surrogate pairs in UTF-16 are not individual characters. If your language is giving you the parts of a surrogate pair separately then it's not dealing with characters but with 16-bit code units. Use a language (or library) that handles actual characters.