What is the biggest code point for the 16-bit wchar_t type?

They say here that the largest code point is UTF-1610FFFF

It also says on this page that

BMP characters require one 16-bit block of code to process or store.

But in the view 10FFFFthere are bits

0001 0000   1111 1111   1111 1111

We see that it takes more than 15 bits of 16-bit wchar_t (the implementation allows for wide characters only with a value> = 0, regardless of the signature wchar_t)

What is the biggest code point for 16-bit wchar_t?

0
source share
1 answer

It says that the largest code point of UTF-16 is 10FFFF

, , .

U + 10FFFF - Unicode. UTF-16 , Unicode 16- ( , UTF-8 - 8- ). , 16 . UTF-16 Unicode U + 0000 - U + FFFF 1 , U + 10000 - U + 10FFFF , , " ". UTF-16 UCS-2, 16- Unicode, U + 0000 - U + FFFF. UTF-16 UCS-2, UTF-16 Unicode.

UTF-16 , , , . , ( , , ).

, , , C UTF-16 ( UTF-8) " ", 1-1 Unicode. , , , , , . .

,

BMP- 16- .

. , -, , BMP (Basic Multilingual Plane, code points U + 0000 - U + FFFF) . 1/17- , , , , . , 16 ( UTF-16), .

, 15 16- wchar_t ( >= 0 , wchar_t)

, . C . - . C, wchar_t, , wchar_t.

16- wchar_t?

. , . () , C. , , .

C UTF-16 , , wchar_t 16 , UTF-16, 16 , , 0xFFFF.

+4

Source: https://habr.com/ru/post/1661663/


All Articles