今天在Ubuntu12.10下使用chrome和chromium访问一个flash网站,可以播放flash来,但中文字符全是是乱码。
解决方案如下:
1.设置chrome浏览器的flash插件
打开Chrome浏览器,输入chrome://plugins/,找到Adobe Flash Player (2 files) ,会看到有两个Flash插件。
需要特别注意这两个插件的位置,从位置路径中可以看出一个是google的,另一个是系统的。

-----------------------------
名称: Shockwave Flash
版本: 11.6.602.180
位置: /opt/google/chrome/PepperFlash/libpepflashplayer.so
------------------------------
名称: Shockwave Flash
版本: 11.2 r202
位置: /usr/lib/flashplugin-installer/libflashplayer.so
------------------------------
启用11.2 r202版本(/usr/lib/flashplugin-installer/libflashplayer.so),停用Google chrome自带的版本
(/opt/google/chrome/PepperFlash/libpepflashplayer.so)。
2.设置系统字体
使用命令:sudo gedit /etc/fonts/conf.d/49-sansserif.conf
打开字符设置文件,将edit标签下的sans-serif修改为sans,保存并退出。
至此全部安装完毕。重新启动浏览器即可显示正常。
------------------------
附:修改后49-sansserif.conf内容:
<?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>sans</string>
</edit>
</match>
</fontconfig>
原始文件内容:
<?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>sans-serif</string>
</edit>
</match>
</fontconfig>
本文介绍了解决Ubuntu12.10系统下Chrome及Chromium浏览器访问Flash网站时出现中文乱码的问题。通过调整浏览器的Flash插件设置,并修改系统字体配置文件49-sansserif.conf中的sans-serif为sans,使中文显示恢复正常。
762

被折叠的 条评论
为什么被折叠?



