How fast do browsers correct UTF-16 strings? (opens in new tab)
JavaScript represents strings using Unicode, like most programming languages today. Each character in a JavaScript string is stored using one or two 16-bit words. The following JavaScript code might surprise some programmers because a single character becomes two 16-bit words. > t="🧰" '🧰' > t.length 2 > t[0] '\ud83e' > t[1] '\uddf0' The convention is … Continue reading How fast do browsers correct UTF-16 strings?
Read the original article