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
Character encoding
(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!
===Example=== Consider a [[String (computer science)|string]] of the letters "abΜ²cπ"βthat is, a string containing a Unicode combining character ({{unichar|0332}}) as well as a supplementary character ({{unichar|10400}}). This string has several Unicode representations which are logically equivalent, yet while each is suited to a diverse set of circumstances or range of requirements: * Four [[Character (computing)|composed characters]]: *:{{code|a}}, {{code|bΜ²}}, {{code|c}}, {{code|π}} * Five [[grapheme]]s: *:{{code|a}}, {{code|b}}, {{code|_}}, {{code|c}}, {{code|π}} * Five Unicode [[code point]]s: *:{{code|U+0061}}, {{code|U+0062}}, {{code|U+0332}}, {{code|U+0063}}, {{code|U+10400}} * Five UTF-32 code units (32-bit integer values): *:{{code|0x00000061}}, {{code|0x00000062}}, {{code|0x00000332}}, {{code|0x00000063}}, {{code|0x00010400}} * Six UTF-16 code units (16-bit integers) *:{{code|0x0061}}, {{code|0x0062}}, {{code|0x0332}}, {{code|0x0063}}, {{code|0xD801}}, {{code|0xDC00}} * Nine UTF-8 code units (8-bit values, or [[byte]]s) *:{{code|0x61}}, {{code|0x62}}, {{code|0xCC}}, {{code|0xB2}}, {{code|0x63}}, {{code|0xF0}}, {{code|0x90}}, {{code|0x90}}, {{code|0x80}} Note in particular that π is represented with either one 32-bit value (UTF-32), two 16-bit values (UTF-16), or four 8-bit values (UTF-8). Although each of those forms uses the same total number of bits (32) to represent the glyph, it is not obvious how the actual numeric byte values are related.
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)