<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yousri&#039;s Blog &#187; 中文乱码</title>
	<atom:link href="http://blog.yousri.org/tag/%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.yousri.org</link>
	<description>一个人骑单车在陌生城市路上自由穿梭的生活</description>
	<lastBuildDate>Fri, 20 Jan 2012 15:01:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>中文乱码解决方案集中篇</title>
		<link>http://blog.yousri.org/2008/11/16/confusion_code.html</link>
		<comments>http://blog.yousri.org/2008/11/16/confusion_code.html#comments</comments>
		<pubDate>Sat, 15 Nov 2008 18:41:57 +0000</pubDate>
		<dc:creator>Yousri</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[中文乱码]]></category>

		<guid isPermaLink="false">http://xmlinuxers.cn/?p=114</guid>
		<description><![CDATA[在不同平台或不同环境开发或使用过程中很经常遇到因为这样那样的原因而引起出现难看的中文乱码的情况  这里就本人曾经遇到过出现中文乱码的问题整理些关于这种问题的解决方法  备录下以便有需要之人方便使用解决。。。 1、Flash方框乱码 如果有乱码那是因为49-sansserif.conf字体配置文件引起的，把它删除后就正常了。 即sudo rm /etc/fonts/conf.d/49-sansserif.conf 注：在删除之前要进行备份，命令为sudo cp /etc/fonts/conf.d/49-sansserif.conf /etc/fonts/conf.d/49-sansserif.conf.bak 做完就OK了。 2、Linux下安装NetBeans中文版出现乱码 在Linux操作系统中安装netbeans中文版出现了乱码，显示为一些方框。 解决方法是把/usr/share/fonts/truetype/arphic/下的字体复制到JAVA_HOME/jre/lib/fonts/fallback下面。其中JAVA_HOME是jdk安装的路径，请自己调整。 此次用的系统是Ubuntu，如果路径有变请自己调整，OK。 3、windows下使用Putty远程链接Linux系统出现乱码 如果你在Windows下用putty来远程连接Linux发现乱码请用下面的方法解决： 找到/etc/sysconfig/i18n，把“LANG=”zh_CN.UTF-8&#8243;”改为“LANG=”zh_CN.GB18030&#8243;”，也就是开头第一句。 4、Linux下Mysql出现中文出现乱码 mysql 安装的默认字符集是 latin1，而 ubuntu os 的字符集是 utf-8 ，因此我们需要将 mysql 的默认字符集改成 utf-8。 修改 /ect/mysql/my.cnf   即 sudo gedit /ect/mysql/my.cnf 找到代码 [client] 和代码 [mysqld] 分别在其下方加入如下代码后保存，这是为了解决mysql中文乱码问题。 代码: default-character-set=utf8 PS：原先建立的数据库还是会出现乱码， 最简单的解决办法 把他删掉再重现建一下 测试： 在 mysql 的终端下执行如下命令 ： show variables <a href='http://blog.yousri.org/2008/11/16/confusion_code.html'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F27%2Fanalysis-and-solution-vim-editor-coding-garbled-on-windows.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Windows系统Vim编辑器乱码解决分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F12%2F12%2Fmicrosoft-ie-xml-leak.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【记录·分享】IE浏览器0DAY漏洞解决措施</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2010%2F03%2F04%2Fabout_fanfou.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">饭否已去 只剩回忆</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F01%2F25%2F%25E4%25B8%2580%25E5%2588%2587%25E9%2583%25BD%25E6%2598%25AF%25E6%259C%25AA%25E7%259F%25A5.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一切都是未知</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在不同平台或不同环境开发或使用过程中很经常遇到因为这样那样的原因而引起出现难看的中文乱码的情况  这里就本人曾经遇到过出现中文乱码的问题整理些关于这种问题的解决方法  备录下以便有需要之人方便使用解决。。。</p>
<p>1、Flash方框乱码<br />
如果有乱码那是因为49-sansserif.conf字体配置文件引起的，把它删除后就正常了。<br />
即sudo rm /etc/fonts/conf.d/49-sansserif.conf<br />
注：在删除之前要进行备份，命令为sudo cp /etc/fonts/conf.d/49-sansserif.conf<br />
/etc/fonts/conf.d/49-sansserif.conf.bak<br />
做完就OK了。</p>
<p>2、Linux下安装NetBeans中文版出现乱码<br />
在Linux操作系统中安装netbeans中文版出现了乱码，显示为一些方框。<br />
解决方法是把/usr/share/fonts/truetype/arphic/下的字体复制到JAVA_HOME/jre/lib/fonts/fallback下面。其中JAVA_HOME是jdk安装的路径，请自己调整。<br />
此次用的系统是Ubuntu，如果路径有变请自己调整，OK。</p>
<p>3、windows下使用Putty远程链接Linux系统出现乱码<br />
如果你在Windows下用putty来远程连接Linux发现乱码请用下面的方法解决：<br />
找到/etc/sysconfig/i18n，把“LANG=”zh_CN.UTF-8&#8243;”改为“LANG=”zh_CN.GB18030&#8243;”，也就是开头第一句。</p>
<p>4、Linux下Mysql出现中文出现乱码</p>
<p>mysql 安装的默认字符集是 latin1，而 ubuntu os 的字符集是 utf-8 ，因此我们需要将 mysql 的默认字符集改成 utf-8。<br />
修改 /ect/mysql/my.cnf   即 sudo gedit /ect/mysql/my.cnf<br />
找到代码<br />
[client]<br />
和代码<br />
[mysqld]<br />
分别在其下方加入如下代码后保存，这是为了解决mysql中文乱码问题。<br />
代码:<br />
default-character-set=utf8<br />
PS：原先建立的数据库还是会出现乱码， 最简单的解决办法 把他删掉再重现建一下<br />
测试：<br />
在 mysql 的终端下执行如下命令 ：<br />
show variables like &#8216;character%&#8217;;</p>
<p>可以看到 字符集已经是 utf-8 了。</p>
<p>5、Linux下gftp出现中文乱码解决措施</p>
<p>第一让系统支持GBK，执行sudo locale-gen zh_CN.GBK<br />
然后执行sudo gedit /usr/bin/gftp<br />
加入export LANG=zh_CN.GBK<br />
保存这个文件。</p>
<p>待补充更新ing。。。。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F02%2F27%2Fanalysis-and-solution-vim-editor-coding-garbled-on-windows.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Windows系统Vim编辑器乱码解决分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F12%2F12%2Fmicrosoft-ie-xml-leak.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【记录·分享】IE浏览器0DAY漏洞解决措施</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2008%2F07%2F25%2Faoyun.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">奥运项目日程安排（图）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.yousri.org%2F2011%2F06%2F04%2F2011-06-04.html&from=http%3A%2F%2Fblog.yousri.org%2F2008%2F11%2F16%2Fconfusion_code.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">2011-06-04 新浪微博敏感点 小黑屋</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.yousri.org/2008/11/16/confusion_code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

