<?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>wd and cc &#187; 乱码</title>
	<atom:link href="http://wdicc.com/tag/%e4%b9%b1%e7%a0%81/feed/" rel="self" type="application/rss+xml" />
	<link>http://wdicc.com</link>
	<description>Happy every day...</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:27:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Blog 做了一下迁移</title>
		<link>http://wdicc.com/move-blog-to-paangood/</link>
		<comments>http://wdicc.com/move-blog-to-paangood/#comments</comments>
		<pubDate>Sat, 28 Jul 2007 02:13:16 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Heart]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[乱码]]></category>
		<category><![CDATA[博邻]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/move-blog-to-paangood/</guid>
		<description><![CDATA[因为要从这边离职了，不能蹭公司的服务器了，所以得找个新的地方。看来看去，dreamhost肯定是很爽的，可是也太贵了，咱现在还没这个资本去买这个空间，后来还是买了盘古的空间了。150一年，100M空间。不过北京网通访问起来速度不是很快。凑合用了，反正也就100多块钱。而刚好我在博邻的奖金也是150.。。。这就给这边花了，呵呵。老婆还说奖金可以去吃好多顿火锅呢，看来没戏了，哈哈。 我原来的数据库用的是　mysql 4.1.x ，新的是 4.0.x ，版本看起来差别不大，可是变化挺大。4.1支持每个库，每个表设置 charset，4.0还没有。4.0导入4.1好多人都乱码了。我从4.1 导入 4.0 开始也乱码了。后来搜了一下，找到一个方法，4.1 的mysqldump 有个 compactable 选项，指定是 mysql40 就行了。现在 phpmyadmin 里面看，中文也正常了。 迁移的时候顺手就换了一个 theme，弄了一天才弄好。不太喜欢这种用ftp上传的方法，都习惯用vim直接编辑文件了，本地没有环境，只能修改一下上传一次。盘古的ftp发呆时间还比较短，隔一会就得重新连接一下。感觉好墨迹。 老婆这几天一定要我写写她，可是写什么呢，她一天到晚都呆在家里，我觉得都要发霉了，让她去晒晒太阳好茁壮成长都懒得去，没办法。不过前几天她突发奇想写了一首改编自《小白兔，白又白》那个儿歌的儿歌，我贴到水木上面，加了好多个x，还是被不可re了，就看到有人发了一个帖子说“我靠，那个儿歌太x了。。。”，不过此文也被立刻删掉啦。不能re了肯定上不了十大了，也挺郁闷的，呵呵。]]></description>
			<content:encoded><![CDATA[<p>因为要从这边离职了，不能蹭公司的服务器了，所以得找个新的地方。看来看去，dreamhost肯定是很爽的，可是也太贵了，咱现在还没这个资本去买这个空间，后来还是买了盘古的空间了。150一年，100M空间。不过北京网通访问起来速度不是很快。凑合用了，反正也就100多块钱。而刚好我在<a href="http://blog.wdicc.com/wordpress/about-mycity/">博邻</a>的奖金也是150.。。。这就给这边花了，呵呵。老婆还说奖金可以去吃好多顿火锅呢，看来没戏了，哈哈。</p>
<p>我原来的数据库用的是　mysql 4.1.x ，新的是 4.0.x ，版本看起来差别不大，可是变化挺大。4.1支持每个库，每个表设置  charset，4.0还没有。4.0导入4.1好多人都乱码了。我从4.1 导入 4.0 开始也乱码了。后来搜了一下，找到一个方法，4.1 的mysqldump  有个 compactable 选项，指定是 mysql40 就行了。现在 phpmyadmin 里面看，中文也正常了。</p>
<p>迁移的时候顺手就换了一个  theme，弄了一天才弄好。不太喜欢这种用ftp上传的方法，都习惯用vim直接编辑文件了，本地没有环境，只能修改一下上传一次。盘古的ftp发呆时间还比较短，隔一会就得重新连接一下。感觉好墨迹。</p>
<p>老婆这几天一定要我写写她，可是写什么呢，她一天到晚都呆在家里，我觉得都要发霉了，让她去晒晒太阳好茁壮成长都懒得去，没办法。不过前几天她突发奇想写了一首改编自《小白兔，白又白》那个儿歌的儿歌，我贴到水木上面，加了好多个x，还是被不可re了，就看到有人发了一个帖子说“我靠，那个儿歌太x了。。。”，不过此文也被立刻删掉啦。不能re了肯定上不了十大了，也挺郁闷的，呵呵。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/move-blog-to-paangood/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mutt的两个问题以及解决办法</title>
		<link>http://wdicc.com/2-problems-in-mutt/</link>
		<comments>http://wdicc.com/2-problems-in-mutt/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 09:06:10 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[msmtp]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2006/11/01/257/</guid>
		<description><![CDATA[mutt用了一段时间之后发现对方发过来的附件的名字都是乱码，多次之后就觉得比较郁闷，每次都得自己修改名字，还得猜文件类型，很郁闷。google了一下，发现了解决办法，是因为mutt默认使用的是rfc2331来解码的，所以添加一个set rfc2047_parameters=yes就可以了，这样对方发过来的邮件就可以正常显示文件名称了。但是同时从那个网址得知，我发出去的附件，也是用rfc2331来编码的，这样到了对方那里，显然会乱码了。测试了一下，outlook里面提示有附件，可是打开是乱码，并且附件名称也不是实际的附件名称。foxmail里面不提示有附件，内容后面会显示几个乱码。 按照前面那个网址，找到了mutt的补丁，尝试了半天，不能在muttng上面正常使用，没办法只好不用muttng用mutt了。打上补丁之后，设置了 set create_rfc2047_parameters=yes  发出去的邮件就正常了。在mutt的patch list列表里面找到sidebar补丁，给mutt打了sidebar的补丁，用起来也还行了。同时，也把我的mutt升级到了1.5.13，比源里面的都新了。呵呵。 此外，还有一个问题就是如何对应不同的账号使用不同的smtp server。 本来从网上找了一个文章说到了这个操作如何实现，我也照搬了，发现似乎可以实现这个功能。可是最近才发现，我完全错了，实际上用的总是msmtp里面设置的那个default smtp server，郁闷坏啦，给头以及同事发了好多邮件了，用的都是我的gmail邮箱。 现在我已经解决了这个问题，用的是send-hook，如下。 send-hook . &#8216;my_hdr from:wd@aaa.com&#8217; send-hook . &#8216;set sendmail=”/usr/bin/msmtp -a gmail”&#8216; send-hook &#8216;~t .*@bbb\.com\.cn$&#8217; &#8216;my_hdr from:stef@bbb.com.cn&#8217; send-hook &#8216;~t .*@bbb\.com\.cn$&#8217; &#8216;set sendmail=”/usr/bin/msmtp -a bbb”&#8216; 这样，针对不同的mail，使用不同的sendmail程序。 发现mutt发送邮件的时候使用的是我的gmail邮箱的时候，我很郁闷，再加上发现他发送的附件在别人那里居然不认，让我就更郁闷了。立刻安装了thunderbird，并且设置好了他，打算以后就用他了。但是发现我已经习惯了mutt了，所以还是回头来给mutt打了补丁，做了修改，让他按照我的习惯来了。 用thunderbird后发现，很多事情不能按照我的意思来，很郁闷。]]></description>
			<content:encoded><![CDATA[<p>mutt<a target="_blank" href="http://blog.wdicc.com/wordpress/2006/09/03/242/">用了一段时间</a>之后发现对方发过来的附件的名字都是乱码，多次之后就觉得比较郁闷，每次都得自己修改名字，还得猜文件类型，很郁闷。google了一下，发现了<a target="_blank" title="gnus/mutt 邮件乱码问题" href="http://learn.tsinghua.edu.cn:8080/2002315162/muttpatched.html">解决办法</a>，是因为mutt默认使用的是rfc2331来解码的，所以添加一个set rfc2047_parameters=yes就可以了，这样对方发过来的邮件就可以正常显示文件名称了。但是同时从那个网址得知，我发出去的附件，也是用rfc2331来编码的，这样到了对方那里，显然会乱码了。测试了一下，outlook里面提示有附件，可是打开是乱码，并且附件名称也不是实际的附件名称。foxmail里面不提示有附件，内容后面会显示几个乱码。</p>
<p>按照前面那个网址，找到了<a target="_blank" title="mutt的rfc2047补丁" href="http://www.emaillab.org/mutt/download1510.html.en">mutt的补丁</a>，尝试了半天，不能在muttng上面正常使用，没办法只好不用muttng用mutt了。打上补丁之后，设置了 set create_rfc2047_parameters=yes  发出去的邮件就正常了。在mutt的<a target="_blank" title="mutt patch list" href="http://wiki.mutt.org/index.cgi?PatchList">patch list</a>列表里面找到<a target="_blank" title="mutt的sidebar补丁" href="http://lunar-linux.org/index.php?page=mutt-sidebar">sidebar补丁</a>，给mutt打了sidebar的补丁，用起来也还行了。同时，也把我的mutt升级到了1.5.13，比源里面的都新了。呵呵。</p>
<p>此外，还有一个问题就是如何对应不同的账号使用不同的smtp server。 本来从网上找了一个文章说到了这个操作如何实现，我也照搬了，发现似乎可以实现这个功能。可是最近才发现，我完全错了，实际上用的总是msmtp里面设置的那个default smtp server，郁闷坏啦，给头以及同事发了好多邮件了，用的都是我的gmail邮箱。</p>
<p>现在我已经解决了这个问题，用的是send-hook，如下。<br />
send-hook . &#8216;my_hdr from:wd@aaa.com&#8217;<br />
send-hook . &#8216;set sendmail=”/usr/bin/msmtp -a gmail”&#8216;<br />
send-hook &#8216;~t .*@bbb\.com\.cn$&#8217; &#8216;my_hdr from:stef@bbb.com.cn&#8217;<br />
send-hook &#8216;~t .*@bbb\.com\.cn$&#8217; &#8216;set sendmail=”/usr/bin/msmtp -a bbb”&#8216;</p>
<p>这样，针对不同的mail，使用不同的sendmail程序。</p>
<p>发现mutt发送邮件的时候使用的是我的gmail邮箱的时候，我很郁闷，再加上发现他发送的附件在别人那里居然不认，让我就更郁闷了。立刻安装了thunderbird，并且设置好了他，打算以后就用他了。但是发现我已经习惯了mutt了，所以还是回头来给mutt打了补丁，做了修改，让他按照我的习惯来了。 用thunderbird后发现，很多事情不能按照我的意思来，很郁闷。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/2-problems-in-mutt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jfreechart 乱码之解决</title>
		<link>http://wdicc.com/jfreechart-encoding/</link>
		<comments>http://wdicc.com/jfreechart-encoding/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 03:37:10 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[jfreechart]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2006/10/12/251/</guid>
		<description><![CDATA[如果想要java程序显示中文，就会用到jre的fonts的设置，这个位于jdk/jre/lib下面，挺多font.properties文件，这些文件就是关键。 jdk会按照如下顺序查找相应的字体设置文件。 1 先看locale，例如如果设置了zh_CN，那么会查找文件名包含zh_CN的文件，如果找不到，就用font.properties文件。 2 然后看系统，如果是Redhat，那么找包含Redhat的，如果找不到就用，font.properties.zh_CN文件。 3 如果上面这些查找过之后没有合适的，那么就使用font.properties文件了。 所以，其实解决方法也比较简单，找一个没乱码的系统，复制相应的font.properties文件就可以了。不过也得仔细查看文件中的设置，>里面提到的字体你的系统里面是不是存在。]]></description>
			<content:encoded><![CDATA[<p>如果想要java程序显示中文，就会用到jre的fonts的设置，这个位于jdk/jre/lib下面，挺多font.properties文件，这些文件就是关键。</p>
<p>jdk会按照如下顺序查找相应的字体设置文件。<br />
1 先看locale，例如如果设置了zh_CN，那么会查找文件名包含zh_CN的文件，如果找不到，就用font.properties文件。<br />
2 然后看系统，如果是Redhat，那么找包含Redhat的，如果找不到就用，font.properties.zh_CN文件。<br />
3 如果上面这些查找过之后没有合适的，那么就使用font.properties文件了。</p>
<p>所以，其实解决方法也比较简单，找一个没乱码的系统，复制相应的font.properties文件就可以了。不过也得仔细查看文件中的设置，>里面提到的字体你的系统里面是不是存在。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/jfreechart-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle10g EM乱码之快速解决</title>
		<link>http://wdicc.com/oracle-em-encoding/</link>
		<comments>http://wdicc.com/oracle-em-encoding/#comments</comments>
		<pubDate>Sat, 05 Aug 2006 08:34:23 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Heart]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2006/08/05/217/</guid>
		<description><![CDATA[来源 这里 一直没怎么用10g的EM工具,今天打开来看看,发现也有相传已久的乱码问题.网上也流传着N种解决方案,仔细看一下,其实这个问题很好解决. 如果安装时,我们系统环境变量设置的是中文环境,那么就不会有这个问题.这个问题根本原因在于安装时,JDK/JRE字符集的自动选择. 在 $ORACLE_HOME/jdk/jre/lib 和 $ORACLE_HOME/jre/1.4.2/lib/ 目录下都有多种字符集字体配置文件: [oracle@danaly ~]$ cd $ORACLE_HOME/jdk/jre/lib [oracle@danaly lib]$ ls font*zh_CN* font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1 font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun [oracle@danaly lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/ [oracle@danaly lib]$ ls font*zh_CN* font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1 font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun 我们只要用合适的中文字符集文件替换缺省文件即可,我选择使用font.properties.zh_CN.Redhat来替换缺省字体定义文件: [oracle@danaly lib]$ cp font.properties.zh_CN.Redhat font.properties 替换之后需要清理一下Cache,重启EM即可. Cache路径通常位于: $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs 清除所有gif文件即可.然后重新启动EM: [oracle@danaly zhs]$ emctl stop dbconsole TZ set to PRC Oracle Enterprise Manager [...]]]></description>
			<content:encoded><![CDATA[<p>来源 <a target="_blank" href="http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html">这里</a></p>
<p>一直没怎么用10g的EM工具,今天打开来看看,发现也有相传已久的乱码问题.网上也流传着N种解决方案,仔细看一下,其实这个问题很好解决.</p>
<p>如果安装时,我们系统环境变量设置的是中文环境,那么就不会有这个问题.这个问题根本原因在于安装时,JDK/JRE字符集的自动选择.</p>
<p>在 $ORACLE_HOME/jdk/jre/lib 和 $ORACLE_HOME/jre/1.4.2/lib/ 目录下都有多种字符集字体配置文件:<br />
<span id="more-217"></span><br />
[oracle@danaly ~]$ cd $ORACLE_HOME/jdk/jre/lib<br />
[oracle@danaly lib]$ ls font*zh_CN*<br />
font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1<br />
font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun</p>
<p>[oracle@danaly lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/<br />
[oracle@danaly lib]$ ls font*zh_CN*<br />
font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1<br />
font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun</p>
<p>我们只要用合适的中文字符集文件替换缺省文件即可,我选择使用font.properties.zh_CN.Redhat来替换缺省字体定义文件:</p>
<p>[oracle@danaly lib]$ cp font.properties.zh_CN.Redhat font.properties</p>
<p>替换之后需要清理一下Cache,重启EM即可.</p>
<p>Cache路径通常位于:</p>
<p>$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs</p>
<p>清除所有gif文件即可.然后重新启动EM:</p>
<p>[oracle@danaly zhs]$ emctl stop dbconsole<br />
TZ set to PRC<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0<br />
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.</p>
<p>http://danaly.hurrray.com.cn:1158/em/console/aboutApplication</p>
<p>Stopping Oracle Enterprise Manager 10g Database Control &#8230;<br />
&#8230;  Stopped.<br />
[oracle@danaly zhs]$ emctl start dbconsole<br />
TZ set to PRC<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0<br />
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.</p>
<p>http://danaly.hurrray.com.cn:1158/em/console/aboutApplication</p>
<p>Starting Oracle Enterprise Manager 10g Database Control &#8230;&#8230;&#8230;&#8230;.. started.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Logs are generated in directory<br />
/opt/oracle/product/10.2.0/danaly.hurrray.com.cn_danaly/sysman/log</p>
<p>现在登陆Web页面,EM显示就可以正常显示中文了.</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/oracle-em-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>weblogic乱码问题</title>
		<link>http://wdicc.com/weblogic-encoding/</link>
		<comments>http://wdicc.com/weblogic-encoding/#comments</comments>
		<pubDate>Sat, 05 Aug 2006 08:28:02 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[weblogc]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2006/08/05/215/</guid>
		<description><![CDATA[1 先看这里：WebLogic8.1的中文问题解决方法 http://dev2dev.bea.com.cn/techdoc/200311546.html 2 看看系统locale的设置，可以使用locale命令查看当前的locale设置，可以使用如下命令设置locale。 #LANG=en_US 没有在weblogic的手册中找到关于这部分的信息，可以测试一下系统locale对应用是否有影响。 3 下面是手册中关于国际化的一段说法，按照下面的说法，应该是不管有没有设置weblogic的字符集，他都会正确处理多字节字符，默认使用的是utf－8。 Often the default character sets used by WebLogic Server are adequate and you do not need to explicitly specify a character set for a Web Service. For example, if a client application specifies its preferred character set, and there is no character set specified for a [...]]]></description>
			<content:encoded><![CDATA[<p>1 先看这里：WebLogic8.1的中文问题解决方法</p>
<p>http://dev2dev.bea.com.cn/techdoc/200311546.html</p>
<p>2 看看系统locale的设置，可以使用locale命令查看当前的locale设置，可以使用如下命令设置locale。</p>
<p>#LANG=en_US</p>
<p>没有在weblogic的手册中找到关于这部分的信息，可以测试一下系统locale对应用是否有影响。<br />
<span id="more-215"></span><br />
3 下面是手册中关于国际化的一段说法，按照下面的说法，应该是不管有没有设置weblogic的字符集，他都会正确处理多字节字符，默认使用的是utf－8。</p>
<p>Often the default character sets used by WebLogic Server are adequate and you do not need to explicitly specify a character set for a Web Service. For example, if a client application specifies its preferred character set, and there is no character set specified for a Web Service, then WebLogic Server responds by using the client&#8217;s preferred character set. Also, non-internationalized WebLogic Server instances use the US-ASCII character set by default, and internationalized WebLogic Server instances use the UTF-8 character set by default, and both of these character sets are compatible when one WebLogic Server instance is communicating with the other. This also means that a Web Service running on a non-internationalized WebLogic Server instance can handle multi-byte characters correctly.</p>
<p>具体修改的方法可以参看这里：http://e-docs.bea.com/wls/docs81/webserv/i18n.html。<br />
生效的顺序如下：</p>
<p>Order of Precedence of Character Set Configuration Used By WebLogic Server</p>
<p>The following list shows the order by which WebLogic Server determines the character set of a WebLogic Web Service when it is creating the SOAP response to an invoke of one of its operations:</p>
<p>1. The value of the charset attribute in the corresponding <web-service> element of the web-services.xml deployment descriptor.</p>
<p>If this is not set, then WebLogic Server looks at the following:</p>
<p>2. The character set preferred by the client application that invoked the Web Service operation. If your client application uses the WebLogic Web Services client APIS, the character set is specified using the weblogic.webservice.binding.BindingInfo.setAcceptCharset() method.</p>
<p>If this is not set, then WebLogic Server looks at the following:</p>
<p>3. The value of the WebLogic Server system property weblogic.webservice.i18n.charset.</p>
<p>If this is not set, then WebLogic Server looks at the following:</p>
<p>4. The character set specified for the JVM. Specifically, if the JVM property user.language is set to en, then WebLogic Web Services use the US-ASCII character set. If the user.language property is set to anything else, WebLogic Web Services use the UTF-8 character set.</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/weblogic-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

