Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
UTF-8
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Comparison to UTF-16 == {{See also|Comparison of Unicode encodings}} {{unsourced section|find=UTF-8|find2=comparison to UTF-16|date=December 2024}} For a long time there was considerable argument as to whether it was better to process text in [[UTF-16]] or in UTF-8. The primary advantage of UTF-16 is that the [[Unicode in Microsoft Windows|Windows API]] required it for access to all Unicode characters (UTF-8 was not fully supported in Windows until May 2019). This caused several libraries such as [[Qt (software)|Qt]] to also use UTF-16 strings which propagates this requirement to non-Windows platforms. In the early days of Unicode there were no characters greater than {{tt|U+FFFF}} and [[combining characters]] were rarely used, so the 16-bit encoding was effectively fixed-size. Some believed fixed-size encoding could make processing more efficient, but any such advantages were lost as soon as UTF-16 became variable width as well. The code points {{tt|U+0800}}{{ndash}}{{tt|U+FFFF}} take 3 bytes in UTF-8 but only 2 in UTF-16. This led to the idea that text in Chinese and other languages would take more space in UTF-8. However, text is only larger if there are more of these code points than 1-byte ASCII code points, and this rarely happens in the real-world documents due to spaces, newlines, digits, punctuation, English words, and (depending on document format) markup. UTF-8 has the advantages of being trivial to retrofit to any system that could handle an [[extended ASCII]], not having byte-order problems, and taking about half the space for any language using mostly Latin letters.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)