<?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>杰克，快跑！ &#187; 中文乱码</title>
	<atom:link href="http://blog.jackrun.com/archives/tag/%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.jackrun.com</link>
	<description>busy to live or busy to die</description>
	<lastBuildDate>Thu, 05 Aug 2010 05:58:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>解决Linux用定时任务crontab之行脚本中文乱码问题</title>
		<link>http://blog.jackrun.com/archives/382.html</link>
		<comments>http://blog.jackrun.com/archives/382.html#comments</comments>
		<pubDate>Wed, 03 Sep 2008 02:55:00 +0000</pubDate>
		<dc:creator>Peltason</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[中文乱码]]></category>

		<guid isPermaLink="false">http://www.jackrun.com/?p=382</guid>
		<description><![CDATA[最近用crontab配置了一个定时任务来跑groovy脚本，发现控制台输出的中文都是乱码，我的groovy程序是用shell脚本来执行的，而直接运行shell脚本则没有乱码问题。原来是因为crontab启动的时候很多用户的环境变量都不会加载，而系统编码的设置估计也没加载，于是在 shell脚本中添加了引入编码：
LANG=zh_CN.GBK
export LANG
这样就ok了！
]]></description>
			<content:encoded><![CDATA[<p>最近用crontab配置了一个定时任务来跑groovy脚本，发现控制台输出的中文都是乱码，我的groovy程序是用shell脚本来执行的，而直接运行shell脚本则没有乱码问题。原来是因为crontab启动的时候很多用户的环境变量都不会加载，而系统编码的设置估计也没加载，于是在 shell脚本中添加了引入编码：</p>
<p><span style="color: #ff0000;">LANG=zh_CN.GBK</p>
<p>export LANG</span></p>
<p>这样就ok了！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jackrun.com/archives/382.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
