Matlab outputs Chinese characters to solve the problem of garbled characters in English system

After a few months of review, I will post the more specific ones, otherwise it will be prosecuted as plagiarism after it is released now.


Each Chinese character has an area code

For example, 'ah' is 1601


There are 3755 first-level Chinese characters, and there are formulas that can be converted into their respective location codes from 1 to 3755 in sequence, and they will be posted later.


Convert the area code to the internal code:

like 'ah'

Area code 1601

The area code is 4 digits, which can be disassembled into half two digits + two digits, that is, 16 and 01

Internal code [left two digits + 160, right two digits + 160]

That is [16+160,01+160]

I use decimal, so I added 160. For hexadecimal, add A0


In-machine code Display final Chinese characters

like 'ah'

Internal code [176,161]

Final Chinese characters native2unicode([176,161])


The problem I encountered was that the Chinese characters displayed on my computer were normal, but the school computer displayed garbled characters. The computer system in the school is in English.

Then

Each Chinese character has a unicode code

For example, 'ah' is 21834

a='啊';
b=a-0;

Then b will display the unicode number

The unicode codes are all displayed correctly in the English system, but there can only be numbers, and the Chinese cannot be changed.


After researching for a long time, I found that the solution is actually very simple

Plus the encoding format of GB2312

native2unicode([176,161],'GB2312')


Guess you like

Origin blog.csdn.net/hmf532123602/article/details/50727674