---
title: "Linux下Chrome标题栏中文乱码"
author: "lean1252"
date: "2014-08-31T12:39:21Z"
tags: []
categories: ["操作系统"]
slug: "linux-chrome"
draft: false
lastmod: "2014-08-31T12:40:06Z"
id: 2111220
url: "https://asflex.iteye.com/blog/2111220"
---

在使用Linux的时候你会遇到一些奇奇怪怪的问题,不过,你会在解决这些问题的过程当中就不知不觉都学到很多东西

比如说最近我把系统的一些包更新后,发现Chrome浏览器的标题栏的中文部分全部为乱码,但FireFox就没有这个问题


网上有人给出这个问题的解决是通过修改文件/etc/fonts/conf.d/49-sansserif.conf倒数第四行为自己喜欢的字体就行了,如我的改为ubuntu

 view plaincopy在CODE上查看代码片派生到我的代码片
<?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">  
            <span style="color:olive">**<string>ubuntu</string>  **</span>
        </edit>  
    </match>  
</fontconfig>  

但原理是什么呢?这是一个问题!!!