In the program, full-width and halfwidth determination is often performed on characters or strings, such as full-width letters, numbers, and punctuation marks. Although there are many ways to make correct judgments, I want to know what the essence of these judgments is, that is, the encoding of characters or the storage of Characters in the computer... in the program, full-width and halfwidth determination is often performed on characters or strings, such as full-width letters, numbers, and punctuation marks. Although there are many ways to make correct judgments, what I want to know is what the essence of these judgments is, that is to say, after determining the character encoding or the length of the character stored in the computer, it is concluded whether the character is full or half-width. Although it is a matter of literacy level, I would like to have a clear understanding of the nature of such issues. Please kindly advise! Thank you!
The implementation language is not limited, preferably php, java or js.
Reply content:
In the program, full-width and halfwidth determination is often performed on characters or strings, such as full-width letters, numbers, and punctuation marks. Although there are many ways to make correct judgments, what I want to know is what the essence of these judgments is, that is to say, after determining the character encoding or the length of the character stored in the computer, it is concluded whether the character is full or half-width. Although it is a matter of literacy level, I would like to have a clear understanding of the nature of such issues. Please kindly advise! Thank you!
The implementation language is not limited, preferably php, java or js.
This is actually quite understandable. The full-width and full-width information is only different in display. In the final analysis, the machine code stored in the computer after conversion (I don't know if it is called this) is actually different, different machine codes correspond to different characters. To make a difference, php can be converted to the \ xE2 format (I do not know this format is called Shenma .. = !), Js should also have corresponding methods.