Unicode
Révision datée du 11 septembre 2019 à 22:26 par Seb35 (discussion | contributions) (notes about UTF-16)
UTF-16
1 or 2 code units of 16 bits = 2 bytes
If 2 code units, first one is in 0xD800-0xDBFF, second one is in 0xDC00-0xDFFF.
- First one: 6 fixed bits (0b110110) then 4 bits encoding the Unicode plan (minus one: 1-16 become 0-15) then 6 strong bits inside the plan
- Second one: 6 fixed bits (0b110111) then 10 bits inside the plan
Non-private astral planes 0x10000-0xEFFFF are encoded in UTF-16: [\uD800-\uDAFF\uDB00-\uDB7F][\uDC00-\uDFFF]
Astral planes are encoded in UTF-16: [\uD800-\uDBFF][\uDC00-\uDFFF]