Home > OS >  How said all Windows 2 bytes of the unicode characters?
How said all Windows 2 bytes of the unicode characters?

Time:09-27


Unicode want said all characters in the world need to use four bytes (because there is no marking a unicode), the disadvantage is that each character with a four bytes
Utf-8 also can represent all characters in the world, but most benefits are characters only need one or two bytes can say
So the length of the Windows kernel in unicode is two bytes, how to say those of 3 to 4 bytes in Chinese?

CodePudding user response:

Utf-8 also can represent all characters in the world, but the benefits are characters only need one or two bytes can say

See, it is most of the characters, not all characters, cannot use 1, 2 bytes, with 3, 4 bytes,

CodePudding user response:

You said this I know, but my question is, why Windows kernel code is the unicode 2 bytes, but we still can use at ordinary times when using to all of the characters of characters (including 3-4 bytes)
So either Windows kernel code is 4 bytes unicode
Or Windows there is other way to handle it,

CodePudding user response:

refer to the second floor callmew response:
you said this I know, but my question is, why Windows kernel code is the unicode 2 bytes, but we still can use at ordinary times when using to all of the characters of characters (including 3-4 bytes)
So either Windows kernel code is 4 bytes unicode
Or Windows there is other way to handle it,
you for a while unicode utf-8 for a while, what are you talking about

CodePudding user response:

I think the topic owner can refer to this article
https://blog.csdn.net/kemaWCZ/article/details/50749209
Windows using UTF - 16 is lengthened, most use 2 bytes, but also can use the 4 bytes, details of the problem is really trouble, especially to judge whether there are a few characters inside a string when, can't simply calculated according to the string to take up space,

CodePudding user response:

The
reference 4 floor godspeed_g reply:
I think the topic owner can refer to this article
https://blog.csdn.net/kemaWCZ/article/details/50749209
Windows using UTF - 16 is lengthened, most use 2 bytes, but also can use the 4 bytes, details of the problem is really trouble, especially determine how few characters inside a string when, can't simply calculated according to the string to take up space,


Thank you very much!
  • Related