努力思考 + 实践, 眼高手低是不行的. 注册 | 登陆
浏览模式: 标准 | 列表2008年05月的文章

Ubuntu8.04下flash中文乱码问题解决方案备忘

装完Ubuntu8.04 LTS后发现博客上的饭否flash插件中文显示乱码,so google了一下,找到了解决方案,在此备忘:

请仔细阅读步骤说明!

打开终端,执行:
cd /etc/fonts/conf.d/

为了安全,备份一下字体配置文件:
sudo cp 49-sansserif.conf 49-sansserif.conf_backup

以root身份打开:
sudo gedit ./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-serif</string>
</edit>
</match>
</fontconfig>

如上所示,将其中的第1、2、4个<string>后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写
比如:我的系统中安装了wqy-zenhei.ttf,我则用wqy-zenhei代替上述所说的字段:
我的系统修改后的文件如下所示(注意:个人根据自己的实际情况修改)

<?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>wqy-zenhei</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>wqy-zenhei</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>wqy-zenhei</string>
</edit>
</match>
</fontconfig>

Tags: ubuntu, flash, 乱码

批处理切换网络配置

1、右键单击桌面上的“网上邻居→属性”,设置“本地连接”网卡在其中一个网段使用的TCP/IP属性。设置好后,进入命令行模式,确保当前目录为C: Documents and SettingsAdministrator,输入以下命令:netsh -c interface dump >c:ip1.txt

2. 用同样的方法将该网卡TCP/IP属性设置成在另一网段中使用的网络配置,在命令行中执行以下命令:netsh -c interface dump >c:ip2.txt

3. 用记事本制作一个批处理文件,命名为ip1.bat,内容为:netsh -f c:ip1.txt;制作另一个批处理文件ip2.bat,输入内容:netsh -f c:ip2.txt。在桌面上单击右键新建快捷方式,单击“浏览”,将项目的位置指向ip1,输入快捷方式的名称“网段1”;重复刚才的步骤,将项目位置指向ip2.bat,建立“网段2”快捷方式。如果你现在所处的网段是网段1,用鼠标双击“网段2”快捷方式,然后用Ipconfig/all命令检测一下,有关的网络配置是不是修改过来了?只要掌握了上面的方法,从此再也不用为切换IP地址而烦恼了!

Tags: 局域网, ip, tcp, bat, 批处理