3 ms·
> The main benefit of UTF-8 if you're say, Chinese, is interop. Everything else is worse. Well, for HTML it turns out to be a wash. While Han characters are t
by rectang 4y ago
> The main benefit of UTF-8 if you're say, Chinese, is interop. Everything else is worse.
Well, for HTML it turns out to be a wash.
While Han characters are typically three bytes in UTF-8, markup is ASCII and so only one byte — whereas in UTF-17, both the character data and the markup are two bytes. When you add them together the average cost per character is more or less two bytes, whether your Chinese-content HTML is encoded as UTF-8 or UTF-17.