The reason of garbled and the removal method Daquan

Source: Internet
Author: User
Tags base64 base64 encode character set file size format message html page zip set up email

When we browse the Web, open a document or mail, and run the software, we often see garbled characters, usually due to the source file encoding, Windows does not correctly identify the cause, or it may be other reasons. Garbled to bring us too much trouble, in order to help everyone completely get rid of garbled, the following we will discuss the reason for the formation of garbled and its elimination method.

First, there are five types of garbled characters

Common garbled, generally can be divided into five types: the first class is a text/document file garbled, which is generally due to the source file encoding, and the encoding used by Windows is not common cause; the second is the Web page garbled, the formation of the reason and the first type of garbled like; the third class is the Windows system interface is garbled, That is, the Chinese Windows menu, desktop, prompt box, such as display garbled, mainly in the Windows registry about the font part of the improper settings caused; the fourth class is the application of the interface garbled, that is, various applications (including the game) originally displayed in Chinese language garbled, the formation of the cause is more complex, There is a second type of garbled reason, it may be the software used in the Chinese library, by the English link library coverage caused by the fifth category is the message garbled, the formation of the cause is extremely complex.

Second, how to eliminate the application interface garbled?

At present, some software issued a Unicode version, which is a common character encoding standard, covering the global multi-language and ancient prose and professional symbols, this version of the software run in any system and language is not garbled, if the program is non-Unicode encoding, there will be garbled phenomenon.

"Reason for formation": There are three of reasons. If it is because the Windows registry information about font settings is not correct, you can use the following "How to eliminate the Windows system interface garbled" approach to solve, if the use of the method can not solve, it may be due to the software's Chinese link library, is covered by the English link library. This phenomenon often occurs in the use of Microsoft development tools such as VB, VC development of Chinese software, such software, menus and other display interface of Chinese characters are subject to a dynamic link library (DLL file) control, and the software of this dynamic link library is generally installed in the Windowssystem directory, If later installed an English software also uses the same name dynamic link library, the English software dynamic link library will overwrite the Chinese link library, thus, runs the Chinese software to call the English dynamic link library, therefore appears garbled. WORKAROUND: Reinstall the Chinese software and restore the Chinese dynamic link library.

If the above method also does not help, for the win9x/me system, you can install the use of MagicWin98 (download address, Antarctic star and other internal code conversion software, the conversion code can be eliminated garbled; For WinXP Systems, it is recommended to use the Microsoft MultiLanguage Support tool Microsoftapplocale (download address, which can be used to set the appropriate locale for the specified program, which also eliminates garbled characters.

Third, how to eliminate text/document file garbled?

"Formation reason": generally due to the character set used in the document, the system does not support the cause. For example, traditional Chinese documents are displayed in the Simplified Chinese system, or vice versa, resulting in garbled document display. As long as your inner code conversion is correct, for example, the original is a traditional internal code, converted to a simple body code (or vice versa), can eliminate garbled characters.

"Solution": there are four ways to resolve this:

1. Using WORD2003/XP to convert inside code

WORD2003/XP supports a wide variety of languages, you can display text files of non-Unicode type correctly, click the "Language"/settings language under the "Tools" menu, you can set the default language to non-Chinese, such as Japanese, so Word can display Japanese correctly.

Of course, you can also use it for Simplified Chinese and Traditional Chinese conversion between the work, if the file is garbled, you can eliminate the conversion. For example, to convert traditional Chinese to Simplified Chinese, the method is: Select the file to convert the inner code, in the popup dialog (as shown below), select "Other encoding" in the "Traditional Chinese (BIG5)" One, open this file will not appear garbled.

2, use WORD2003/XP no garbled save

In Word2003/xp, when saved, select "Save as" in "File", Save as "WORD" document, save it as plain text and other formats after saving, or select "Tools/language/Simplified Chinese conversion" in the menu bar to save the code after conversion.

3. Using the Internal Code conversion tool

In addition, the use of the internal Code conversion tool can also eliminate this type of garbled, you just BIG5 (traditional Chinese) and GB2312 (GB code, Simplified Chinese) to convert each other can be achieved. The commonly used internal code conversion tools are:

• Disk array principle

4. Using WPS2000 to convert inside code

WPS2000 can also convert internal code, support GB2312, BIG5, GBK and other three major Chinese character coding, and in the output of RTF, TXT, htm format files in the internal code conversion. Iv. How to eliminate Web page garbled?

"Formation Reason": Web page garbled is the browser (ie, etc.) on the HTML page to explain the formation, if the page is encoded as a, the browser is encoded B display the page, will appear garbled, so as long as you in the browser also to code a display the page, it will eliminate garbled characters.

For example, the code of the Web page, such as: 〈html〉〈head〉〈meta content= "text/html;charset=iso-8859-1" 〉〈/head〉 statement, the browser when displaying this page, will appear garbled, because the browser will be the language of this page is considered "European language".

"Solution": there are four ways to resolve this:

1. Select the "Encode" menu in the browser

Install the multilingual support package for the browser beforehand (for example, to install the multi-language support package when IE is installed), so that when browsing the Web page garbled, you can manually change the encoding of such pages, in the browser select "View"/"Encode"/"Auto Select"/Simplified Chinese (GB2312) in the menu bar, For Traditional Chinese, select "View"/"Encode"/"Auto Select"/Traditional Chinese (BIG5), other languages, and so on, select the appropriate language, so that you can eliminate garbled Web pages.

2. Modify the page code

Use FrontPage and other software to open garbled pages, modify the page code, in the following sentence

〈meta content= "Text/html;charset=iso-8859-1", the Language "iso-8859-1" changed to GB2312, if it is the traditional Web page is changed to BIG5.

3, no garbled save page

Open the Web page in a browser, select "Auto Select" in "View"/"encode", Save type Select "Web Page" when saving, encode "UNICODE", so that the saved Web page opens again, in the browser menu "View"/"encoding" regardless of the choice of Simplified Chinese (GB2312), Simplified Chinese (HZ) or Unicode (UTF-8) or Traditional Chinese (BIG5), the final display does not appear garbled.

4. Using multi-code display software

The use of multi-code display software to convert the inner code, can also eliminate garbled characters. Common multi-code display software is:

Five, how to eliminate the Windows system interface garbled?

"Reason for formation": This type of garbled character is due to the abnormal configuration of fonts in the Windows registry, even if you use internal code translation software (such as NJStar, MAGICWIN98, etc.) processing will not be eliminated.

Workaround: In the Windows registry, restore the correct settings for the font section.

1, using the display of the normal computer

If you have a computer with the same version of Windows and a normal display, you can restore it by selecting Start/Run on the normal machine, typing "REGEDIT" in the dialog, opening the Registry Editor, and positioning the cursor to "Hkey_local_ Machinesystemcurrent CONTROL Setcontrolfontassoc ", select" Registry/Export Registry File ", select" Branch ", export the branch registry information to the file (such as Li.reg) (as shown below); Copy the Li.reg file to the machine that displays garbled characters, run regedit on the display garbled machine, select "Register Registry"/"Import Registration Registry", and import the Li.reg file into the registry.

2, in the display garbled computer operation

If you do not see a normal computer available, you will need to manually restore the font part of the registry keys, the following two ways:

The first method: Edit a file with Notepad, and then save it as the extension "REG" (the file name is arbitrary), and then right-click on the file, in the context menu select Merge, you can complete the registry changes. The content of the text file is as follows:



[Hkey_local_machinesystemcurtentcontrolsetcontrolfontassocassociated Defaultfonts]

"Assocsystemfont" = "Simsun.ttf"

"Fontpackagedontcare" = "Song Body"

"Fontpackageroman" = "Song Body"

"Fontpackageswiss" = "Song Body"

"Fontpackagemodem" = "Song Body"

"Fontpackagescript" = "Song Body"

"Fontpackagedecorative" = "Song Body"

[Hkey_local_machinesystemcurtentcontrolsetcontrolfontassocassociated Charset]

ANSI (XX) = "Yes"

"SYMBOL" = "No"

"OEM (FF)" = "Yes"

"GB2312" = "Yes" The second method: on the computer garbled, click the menu "Start"/Run, type regedit to open the registry; "Hkey_local_machinesystemcurrent CONTROL Setcontrolfontassoc ", under normal circumstances there will be associated defaultfonts, associated charset two folders, the correct parameters in these folders are shown in the following table:

• Disk array principle

When the Chinese characters garbled, the contents of the above two folders will be incomplete, and some do not associated CharSet folder, or the contents of which are incomplete, and some associated defaultfonts under the content is incomplete. As long as you open the registry, under "Hkey_local_machinesystemcurrentcontrolsetcontrolfontassoc", according to the above correct content recovery.

Six, how to eliminate the message garbled?

Message garbled form a lot of reasons, mainly has the following several aspects, for the following reasons, should take a different garbled elimination method:

1. The language of the two sides is different.

The different operating systems used by the transceiver can cause garbled characters. For example, the sender is using Windows in Japanese, and the recipient is using the Simplified Chinese windows, which of course will cause garbled characters. For Chinese e-mail, if the recipient's operating system is in English environment, and there is no plug-in Chinese system or not switched to Chinese (such as NJStar) encoding method, it will not be able to see Chinese, only garbled. All double-byte characters (such as Chinese Simplified/traditional GB and BIG5 code and Japanese JIS, EUC and Korean KSC codes, etc.) will appear garbled in the non-native language operating system, also in the Chinese Simplified GB code environment, look at other double-byte characters can only see garbled.

"Workaround": Install multi-language support package or use multi-code display platform (such as NJStar), to the received mail, according to the language they use to switch to the appropriate encoding method can be eliminated garbled.

2, the sending server does not support 8-bit (non-ASCII code format) transmission

Different message transmission mechanism or message encoding may cause mail server not to support 8-bit (non-ASCII format) transmission and form message garbled. For example, to send messages in non-ASCII format such as Chinese or binary, such as Chinese double-byte files, picture files. jpg, executable. exe or compressed file. zip, etc. binary files, the mail server may not be able to process, then the letter in the eighth bit of each character is filtered out, This causes the message information distortion or the damage, when receives the mail is a bunch of garbled characters.

"Workaround": can only be resolved by the sender. When sending a 8-bit formatted text file, it must be encoded in advance to convert the file to a 7-bit ASCII code or a smaller number of digits before the file can be transferred correctly. When a recipient receives a 7-bit or less-formatted message, it can be converted to a 8-bit format, which avoids garbled characters.

3. Different email software and settings for receiving the originator

The "attachment" function of the general email software can automatically encode the letter first and then send it out. So long as the recipient uses the email software (such as Outlook XP, etc.) can distinguish the encoding of the letter, you can automatically decode the letter. If the sender's email software is different from the default configuration, the sender's own custom-made some of the options, after receiving the encoded letter, the system may not be able to identify the encoding method used in the letter, nature can not automatically decode, so there will be garbled.

"Solution": If you use OE to receive Chinese mail, see is a garbled, you can check "view"-"code", whether to choose "Simplified Chinese (GB2312)", select the right there will be no problem.

In addition, you can use Winzip+ie to decode, by copying the contents of the garbled message to the Clipboard, then pasting it into Notepad, saving it as a text file (for example, LI.txt), and then changing the suffix to. Uue (instead of Li.uue), clicking this file will start WinZip, Then start IE, the WinZip 001.txt files dragged into the IE window, will display the original content of the message, and will not see garbled. 4, email software does not recognize the encoding method of the message

The main encoding methods of the message are: Uuencode, Base64 encode, Qp-encode, BinHex and so on. If the email software does not recognize the encoding method of the message, the message will appear garbled. Therefore, you can determine the encoding method according to the key characters in the message, select the appropriate decoding software to decode.

(1), QPENCODEQP code

The encoding is "quoted-printable content-transfer-encoding" because the contents of this format message are characters that can be printed in the ASCII character set, so the name contains Printable. The approximate format is: =A1A=B1Z=A6N=A1I=A7=DA=A6B=BA=F4=B8=F4=A4W=B1O......=E5==ABH=A5=F3=B0=DD=C3D=B1M=AEA=A1A ...

Feature: Content usually has a lot of equals "=", so it is not necessary to look at "letterhead" to determine whether it is a QP encoding.

Decoding method: The mail is similar to a1a=b1z=a6n ... Part of the encoding is copied down, pasted into a new plain text file, and then added to the header of the file in quoted-pintable format:

Contenet-type:text/plain; charset= "GB2312"

content-transfer-encoding; Quoted-pintable

Then save the file with the "EML" suffix and double-click it to open the file to display the correct content. If there are some Chinese characters garbled, you can use WinZip to save the eml files after decompression, can see the correct content.

(2) Mime/base64 encode encoding

The encoding means that 3 bytes (8 bits) are represented by 4 bytes (6 bits), since the encoded content is 6 bits, so the 8th bit can be prevented from being truncated, in the general format:


Content-type:text/plain; charset= "Us-ascii"





F6p9qoz6xoie1py3jvc29mdcuibjbnrlcm5ldcbn .....

Characteristics: Before garbled generally have the following parts "letterhead": content-type (Content Type), CharSet (character set) and content-transfer-encoding (content transmission garbled way).

Decoding method: With the email software, select encoding in the BASE64 option can be decoded, decoding will eliminate garbled.

(3), BinHex code

This encoding is generally in the form of:

(This file must is converted with Binhex4.0) Sgmhqbf6pm6hsafapmk69lj0pfexb6qss


0lf6tfit07ddw0shrw0kdqqtuqx9p2m2rlf6p9qoz6xoie .....

Decoding method: Use the email software to decode it, you can also save garbled messages in the email software, save as suffix ". HQX "format file and then use WinZip decoding to expand. Decoding will eliminate garbled characters.

(4), Utif-7/utif-8 code

They are two types of Unicode conversion codes.

(5), Uuencode code

This is the encoding used in the UNIX environment and is rarely used at this time, in the general format:

Begin 644 m1g) o;2! I;&EN+F) b3t! C (vee+fyc= ' 4n961u+g1w (%=e9 "!.; w8@ (#8 @,3 (zm,sdz,c4@,3dy-@I296-e:79e9#h@9g) o;2! f;&%b;6%i; " Yf;&%b+f9u:fet ..... .........


Features: garbled preceded by "Begin XXX", followed by the original file name (such as before encoding, followed by the encoded letter content (such as the above garbled part); Last Behavior "End"

Decoding method: Available becky! Eudora and other email software, select the corresponding options in the encoding can be decoded, you can also save garbled messages in the email software, save as suffix ". UUE "Format file, and then use WinZip decoding expansion, decoding will eliminate garbled. Seven, how to avoid the sender to produce garbled mail?

In order to prevent others from getting garbled, the sender should take the following measures:

1, set the default automatic 7-bit encoding

In the Write (compose) option in the mail client software, the settings are automatically encoded as 7-bit by default. Because when you send a 8-bit formatted text file, you must encode it in advance, convert the file to a 7-bit ASCII code, or a smaller number of digits before you can guarantee the correct delivery of the file. After the recipient receives a 7-bit or less-formatted message, it can be converted to a 8-bit format so that it can be read.

2. Chinese character coding in the signature field before sending

Before sending the Chinese mail, it is best to indicate the standard of Chinese character code (such as GB2312, Chinese Hz, GBK, etc.) in the fixed signature field. Hong Kong, Macao and Southeast Asia E-mail authors in the use of BIG5 code to write the mail, sent to the mainland before the conversion to the above three kinds of simplified GB code of a form, and indicate it in the signature field. If you do not convert it may not be able to read, because domestic users use a lot of mail system does not support BIG5 code.

3. Set up email software correctly

Choose Excellent email and send software can effectively solve the message garbled. If you use Outlook 2003/XP, you should use the "Simplified Chinese (GB2312)" As the default message language in the software, select "International Settings"/use the default encoding for all messages received.

If using the English email software, should be set to: Text setting default Charset:iso 8859-1 (LATIN1); encoding encoding:quoted-printable, not selectable 7-bit (because 7-bit does not support Chinese); Loadline page code page (optional): 936 or hz-gb-2312 to support integer recognition; message format: MIME; font: Arial

If you use other Chinese email software, should be set to: text settings default CHARSET: Simplified Chinese GB2312; encoding method encoding:quoted-printable; message format: MIME; font: Arial

4. Send a test letter when sending important information

When sending important information, you should send a test letter in order to confirm that you can send the body without coding. You should also determine whether the recipient can decode the attachment file. If you are sending a message that has already been encoded, it is a good idea to add enough "letterhead" information so that the recipient knows what decoding method is required. It is suggested to use uuencoding as the letterhead for the Uuencode/uudeview encoding method, and Base64 encoding as the MPack encoding method for the letter head.

If the sender/recipient is miles apart, the eighth bit may be truncated during the transmission. It is better to send a test letter in Chinese to the recipient in the text, and to know if the other person can receive the message text correctly. If the eighth bit is truncated, the recipient will see some garbled characters, rather than the UU/B64/QP format described above, and this letter is almost unrecoverable.

Countermeasures: In Netscape, Eudora, or Pegasus Mail systems that you use, select the "Quoted printalbe" or "MIME encoding" in their preferences or option configuration

5, try to use the "attachment" function to send files

Almost all mail software, such as Netscape, the bat!, becky! When the mail system attaches a file of this type in non-standard ASCII format, the attached file is usually automatically "base64" encoded (only the attachment part is encoded). There is no need to encode the message before sending it in "attachment" mode; Because the Mail software can automatically successfully decode such "additional" files, this method should be preferred when sending Chinese-class mail.

If you cannot send the file as an attachment, you must send the Chinese or the binary file in the body

How can the receiving party avoid garbled messages?

The receiving party should first look up the signature column or the body of the message, with or without the Chinese character coding category specified by the other person, and then select Encode under the Outlook XP View menu, then all Chinese character coding will appear, in which one of the messages indicated is selected.

If you receive a message that does not indicate the Chinese character coding you are using, you can click to select the encoding sequentially until the message body is displayed correctly. If you are using Netscape, you can select the appropriate item in document Encode under the option menu.

Nine, in the cross-lingual operating system between sending and receiving e-mail, how to ensure that not garbled?

If the other side of the use of non-Chinese system, you send him a Chinese mail, he opened your e-mail, will appear garbled. There are two ways to solve this problem:

1. Write Chinese mail with drawing software

Write Chinese mail with drawing software such as brushes, then save the Chinese mail in GIF format, and finally compress it and send it as email attachment.

Run the drawing software, enter text in the picture, save it in GIF format, set the property to black and white (to reduce the volume of the picture), and then use WinZip to compress it into a zip format, as an attachment in the mail message, so that no matter what the other language platform, will not appear garbled, The recipient does not have to download the PDF file Reader and it is easy to read.

2. Use specialized tools to convert and read

Email aid and other tools can convert Chinese mail to aid format file, you send the format file to each other, he then use an email aid to open the watch.

EMAIL aid (included with Ucwin GOLD 1.0) can convert text files to AID format files, only a few more K than the original TXT file size. After writing the Chinese message, save it in text format, then you run the email aid, saved in the aid format, and finally you insert the aid file together with the email aid software as an attachment in the letter. After receiving the letter, just run the email aid, open the aid format file can see the Chinese characters, regardless of the other side in which language platform, will not appear garbled.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.