Solve the Problem of garbled Chinese pages in Firefox in Linux

Source: Internet
Author: User

Solve the Problem of garbled Chinese pages in Firefox in Linux

1. Because firefox allows web pages to select their own fonts by default, some website garbled characters may occur on Linux. Therefore, you can cancel the font selection option on the page to solve some garbled characters.

2. If there are garbled characters and other applications, try the following solutions.

The simple and violent method is to remove the default configuration file directly.

$ Sudo mv/etc/fonts/conf. d/49-sansserif.conf/etc/fonts/conf. d/49-sansserif.conf.bak

In addition, 49-sansserif.conf is the font of Flash Player. You can modify it.

<? Xml version = "1.0"?>
<! DOCTYPE fontconfig SYSTEM "fonts. dtd">
<Fontconfig>
<! --
If the font still has no generic name, add sans-serif
-->
<Match target = "pattern">
<Test qual = "all" name = "family" compare = "not_eq">
<String> sans-serif </string>
</Test>
<Test qual = "all" name = "family" compare = "not_eq">
<String> serif </string>
</Test>
<Test qual = "all" name = "family" compare = "not_eq">
<String> monospace </string>
</Test>
<Edit name = "family" mode = "append_last">
<String> font </string> # change the font to the font you like.
</Edit>
</Match>
</Fontconfig>

Reasons for garbled characters:

The sans and serif fonts are "virtual" fonts. Actually they do not exist.

Is composed of multiple fonts.

This file should be a multi-font file bound to the two virtual font setting files.

Garbled characters are irrelevant to the configuration. I think it may be that you set a non-Chinese font in your program. In this way, the system calls the default font for explanation because the font is incomplete. The sans serif two are commonly used default fonts. As a result, there is a problem with the default font binding (after all, this is something of Westerners, and the font setting is also biased towards the west ). The text is garbled. Or the sans serif font has been set before. The supplemented content affects the font setting. The configuration order here is sorted by file name, and the configuration starting with 48 takes precedence over the configuration starting with 49.

You can try to manually modify the font, which contains xml-style text configuration content. You can find a Chinese font you like and copy it to the font directory of your computer (usually a directory in/usr/share/fonts. Pay attention to the root permission ).

Then modify the configuration file to your favorite combination (start the English language first, then the Chinese language, the font support program will call in order, if you put the font you do not like at the beginning, even if it is supported later, it still calls the first font. Because there is no Chinese Character in the English font, the font program will automatically call the later font ).

After the font is set to sans and serif, restart X to use it. (If the font is not restarted, it is only valid for the latest program ).

This file must use a plain text compiler and the content must be UTF-8 encoded (the Chinese font name must be UTF8 )! In addition, the bound font must be the font in your system. Otherwise, your system will ignore this font and continue to the next one. If none of your Chinese font systems are available, the call fails and Chinese characters cannot be displayed.

Mozilla Firefox 40.0 officially released and downloaded

Manually install Firefox Flash plug-in Ubuntu 14.04

Replacement of Firefox in Ubuntu

Use apt-get to install FireFox and ThunderBird In Debian Linux

Stable Firefox 29 version released-how to install

Mozilla Firefox 31.0 official release and download

Firefox details: click here
Firefox: click here

This article permanently updates the link address:

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: info-contact@alibabacloud.com 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.