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!
=== Surrogates === Since RFC 3629 (November 2003), the high and low surrogates used by [[UTF-16]] ({{tt|U+D800}} through {{tt|U+DFFF}}) are not legal Unicode values, and their UTF-8 encodings must be treated as an invalid byte sequence.<ref name="rfc3629"/> These encodings all start with {{tt|0xED}} followed by {{tt|0xA0}} or higher. This rule is often ignored as surrogates are allowed in Windows filenames and this means there must be a way to store them in a string.<ref name="PEP 529">{{ cite web | title = Change Windows filesystem encoding to UTF-8 | id = PEP 529 | website = Python.org |language = en | url = https://www.python.org/dev/peps/pep-0529/ | access-date = 2022-05-10 }}</ref> UTF-8 that allows these surrogate halves has been (informally) called ''{{visible anchor|WTF-8}}'',<ref name="wtf-8">{{cite web | title = The WTF-8 encoding | url = https://simonsapin.github.io/wtf-8/}}</ref> while another variation that also encodes all non-BMP characters as two surrogates (6 bytes instead of 4) is called ''[[CESU-8]]''.
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)