Causes and reversibility of garbled characters

1: Reasons for garbled codes

        The root causes of garbled codes can generally be attributed to three aspects: 1: garbled codes caused by encoding, 2: garbled codes caused by decoding, and 3: garbled codes caused by the lack of a certain font library (in this case, the user needs to install the corresponding font library) , most of the garbled code problems are caused by inappropriate decoding methods.
 

2: The situation of reversible garbled characters

       1: There are missing fonts. You only need to install the corresponding font library to solve the garbled characters. For example, Windows systems will have a list of installed font libraries in the C:'WindowsIFonts directory. Installing the font library is relatively simple. After downloading, unzip it and then copy it to the Fonts directory of the corresponding system.
       2: If the decoding method and encoding method are inconsistent, you only need to make the decoding method and encoding method consistent to restore the garbled code.

Three: Irreversible situation of garbled characters

       GBK encoding does not support these characters "吉". If the characters "吉"4" are written in a GBK encoded file, then they will become ??, and the corresponding code value is 3E. In this case There is no way to recover. Because the original code value of "吉" has become two 3Es (that is, two question marks), it cannot be recovered anyway.
 

おすすめ

転載: blog.csdn.net/m0_50370837/article/details/118873369