今天在Ubuntu12.10下使用chrome和chromium访问一个flash网站,可以播放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)。
使用命令: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>