<?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>ls /proc &#187; 乱码</title>
	<atom:link href="http://www.lsproc.com/blog/tag/%e4%b9%b1%e7%a0%81/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lsproc.com/blog</link>
	<description>lsproc.com</description>
	<lastBuildDate>Fri, 18 Nov 2011 09:22:52 +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>cacti 图片中文乱码问题</title>
		<link>http://www.lsproc.com/blog/cacti_graph_with_chinese/</link>
		<comments>http://www.lsproc.com/blog/cacti_graph_with_chinese/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 09:02:56 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Linux&Webserver]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.lsproc.com/blog/?p=343</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/cacti_graph_with_chinese/ 首先你需要一个中文字体 如simsun 等 将它放进 /usr/share/fonts目录中 然后执行下面的命令刷新字体缓存 fc-cache -f -v 然后再cacti 中设置 默认字体的路径为你使用的中文字体的路径 测试发现, 字体只能放到系统字体路径当中, 并要刷新字体缓存 -- EOF -- Related Posts2008-03-05 -- 解决webalizer 汉化后图表中乱码的问题 (0)2006-12-27 -- 再谈Wordpress的MySQL乱码问题解决方法 (3)2006-02-26 -- 一切又重新开始了 (0)]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/cacti_graph_with_chinese/">http://www.lsproc.com/blog/cacti_graph_with_chinese/</a></p>
<p>首先你需要一个中文字体<br />
如simsun 等<br />
将它放进 /usr/share/fonts目录中</p>
<p>然后执行下面的命令刷新字体缓存</p>
<pre class="brush: shell">fc-cache -f -v</pre>
<p>然后再cacti 中设置 默认字体的路径为你使用的中文字体的路径</p>
<p>测试发现, 字体只能放到系统字体路径当中, 并要刷新字体缓存</p>
<p><a href="http://www.lsproc.com/blog/wp-content/uploads/2010/01/localhost_memory.png"><img src="http://www.lsproc.com/blog/wp-content/uploads/2010/01/localhost_memory-600x227.png" alt="" title="localhost_memory" width="600" height="227" class="alignnone size-medium wp-image-346" /></a>
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2008-03-05 -- <a href="http://www.lsproc.com/blog/webalizer_graphs_bad_encode/" title="解决webalizer 汉化后图表中乱码的问题">解决webalizer 汉化后图表中乱码的问题</a> (0)</li><li>2006-12-27 -- <a href="http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/" title="再谈Wordpress的MySQL乱码问题解决方法">再谈Wordpress的MySQL乱码问题解决方法</a> (3)</li><li>2006-02-26 -- <a href="http://www.lsproc.com/blog/all-restart/" title="一切又重新开始了">一切又重新开始了</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/cacti_graph_with_chinese/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>解决webalizer 汉化后图表中乱码的问题</title>
		<link>http://www.lsproc.com/blog/webalizer_graphs_bad_encode/</link>
		<comments>http://www.lsproc.com/blog/webalizer_graphs_bad_encode/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 09:47:03 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Linux&Webserver]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[webalizer]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.lostk.com/blog/%e8%a7%a3%e5%86%b3webalizer_%e6%b1%89%e5%8c%96%e5%90%8e%e5%9b%be%e8%a1%a8%e4%b8%ad%e4%b9%b1%e7%a0%81%e7%9a%84%e9%97%ae%e9%a2%98/</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/webalizer_graphs_bad_encode/ 代码如下(webalizer_patch.pl): #!/usr/bin/perl ###################################################### # webalizer_patch.pl # 原作：http://mail.tses.tcc.edu.tw/nuke/sections.php?op=viewarticle&#38;artid=139 # 修改：陶然 &#60;taoran@taoran.net&#62; # 功能: 解决HTML汉化后图表中乱码的问题 # 方法：图表中乱码改用英文显示就正常了 # 需要修改: graphs.c output.c webalizer_lang.h lang.h # # tar zxf webalizer-2.01-10-src.tgz # cd webalizer-2.01-10 # ./configure --with-language=simplified_chinese # perl /path/of/webalizer_patch.pl ./ # &#8230; <a href="http://www.lsproc.com/blog/webalizer_graphs_bad_encode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/webalizer_graphs_bad_encode/">http://www.lsproc.com/blog/webalizer_graphs_bad_encode/</a></p>
<p>代码如下(webalizer_patch.pl):</p>
<pre class="brush: perl">
#!/usr/bin/perl
######################################################
# webalizer_patch.pl
# 原作：http://mail.tses.tcc.edu.tw/nuke/sections.php?op=viewarticle&amp;artid=139
# 修改：陶然 &lt;taoran@taoran.net&gt;
# 功能: 解决HTML汉化后图表中乱码的问题
# 方法：图表中乱码改用英文显示就正常了
#       需要修改: graphs.c output.c webalizer_lang.h lang.h
#
# tar zxf webalizer-2.01-10-src.tgz
# cd webalizer-2.01-10
# ./configure --with-language=simplified_chinese
# perl /path/of/webalizer_patch.pl ./
# make
# make install
#
####################################################
$file_graph	= &quot;$ARGV[0]/graphs.c&quot;;
if(!(-e $file_graph))   {
	print &quot;error open  $file_graph
&quot;;
	print &quot;Usage:
  perl $0  DIR
&quot;;
#DIR是源文件目录，比如 ./
	exit;
}

#把图表中的月份和注释改成英文
@old_var	= (&quot;msg_h_hits&quot;,
		&quot;msg_h_pages&quot;,
		&quot;msg_h_visits&quot;,
		&quot;msg_h_files&quot;,
		&quot;msg_h_sites&quot;,
		&quot;msg_h_xfer&quot;,
		&quot;s_month&quot;);

@new_var	= (&quot;msg_gh_hits&quot;,
		&quot;msg_gh_pages&quot;,
		&quot;msg_gh_visits&quot;,
		&quot;msg_gh_files&quot;,
		&quot;msg_gh_sites&quot;,
		&quot;msg_gh_xfer&quot;,
		&quot;s_gmonth&quot;);

open(IN,&quot;&lt;$file_graph&quot;);
@lines	= &lt;IN&gt;;
$size	= @lines;
close(IN);

`mv $file_graph $file_graph.bak`;
open(OUT,&quot;&gt;$file_graph&quot;);
for($i=0;$i&lt;$size;$i++)   {
	for($k=0;$k&lt;@old_var;$k++)   {
		if($lines[$i] =~ s/$old_var[$k]/$new_var[$k]/g)   {
			print &quot;$i	$old_var[$k] -&gt; $new_var[$k]
&quot;;
			print OUT &quot;/* --- Modified --- */
&quot;;
		}
	}
	print OUT $lines[$i];
}
close(OUT);

#把图表中的标题改成英文显示
$file_output	= &quot;$ARGV[0]/output.c&quot;;
open(IN,&quot;&lt;$file_output&quot;);
@lines	= &lt;IN&gt;;
$size	= @lines;
close(IN);
`mv $file_output $file_output.bak`;
open(OUT,&quot;&gt;$file_output&quot;);
for($i=0;$i&lt;$size;$i++)   {
	if($lines[$i] =~ s/msg_hmth_du,l_month/&quot;Daily Usage for&quot;,s_gmonth/xg) {
		print &quot;$i	patched
&quot;;
		print OUT &quot;/* --- Modified --- */
&quot;;
	} elsif($lines[$i] =~ s/msg_hmth_hu,l_month/&quot;Hourly Usage for&quot;,s_gmonth/xg) {
		print &quot;$i	patched
&quot;;
		print OUT &quot;/* --- Modified --- */
&quot;;
	} elsif($lines[$i] =~ s/msg_ctry_use,l_month/&quot;Usage by Country for&quot;,s_gmonth/xg) {
		print &quot;$i	patched
&quot;;
		print OUT &quot;/* --- Modified --- */
&quot;;
	} elsif($lines[$i] =~ s/msg_main_us/&quot;Usage summary for&quot;/xg) {
		print &quot;$i	patched
&quot;;
		print OUT &quot;/* --- Modified --- */
&quot;;
	}
	print  OUT $lines[$i];
}
close(OUT);

#加入新的函数给前面显示的程序用 

print &quot;
patch	$ARGV[0]/webalizer_lang.h
&quot;;

$file_lang	= &quot;$ARGV[0]/webalizer_lang.h&quot;;
open(OUT,&quot;&gt;&gt;$file_lang&quot;);
print OUT qq~
/* --- start Add  ---*/
char *msg_gh_hits  = &quot;Hits&quot;;
char *msg_gh_pages = &quot;Pages&quot;;
char *msg_gh_visits= &quot;Visits&quot;;
char *msg_gh_files = &quot;Files&quot;;
char *msg_gh_sites = &quot;Sites&quot;;
char *msg_gh_xfer  = &quot;KBytes&quot;;

char *s_gmonth[12]={ &quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;,
                    &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;,
                    &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;,
                    &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot;};

/* -------------End------------- */
~;

#补充声明这些新加的函数
print &quot;
patch	$ARGV[0]/lang.h
&quot;;

$file_lang	= &quot;$ARGV[0]/lang.h&quot;;
open(OUT,&quot;&gt;&gt;$file_lang&quot;);
print OUT qq~
/* --- start Add  ---*/
extern char *msg_gh_hits  ;
extern char *msg_gh_pages ;
extern char *msg_gh_visits;
extern char *msg_gh_files ;
extern char *msg_gh_sites ;
extern char *msg_gh_xfer  ;
extern char *s_gmonth[12];
/* -------------End------------- */
~;

print &quot;Done ^_^
&quot;;

####################################################
</pre>
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2010-01-15 -- <a href="http://www.lsproc.com/blog/bash_if_parameters/" title="bash if条件判断参数">bash if条件判断参数</a> (0)</li><li>2010-01-11 -- <a href="http://www.lsproc.com/blog/cacti_graph_with_chinese/" title="cacti 图片中文乱码问题">cacti 图片中文乱码问题</a> (2)</li><li>2010-01-09 -- <a href="http://www.lsproc.com/blog/linux_timeline/" title="linux timeline">linux timeline</a> (2)</li><li>2008-12-16 -- <a href="http://www.lsproc.com/blog/linux_webserver_cmd/" title="Webserver 维护常用命令">Webserver 维护常用命令</a> (9)</li><li>2008-11-10 -- <a href="http://www.lsproc.com/blog/useful_linux_command/" title="一些 linux 命令">一些 linux 命令</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/webalizer_graphs_bad_encode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>再谈WordPress的MySQL乱码问题解决方法</title>
		<link>http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/</link>
		<comments>http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/#comments</comments>
		<pubDate>Wed, 27 Dec 2006 02:49:16 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Program&Database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.lostk.com/blog/webdesign/mysql_encode_error_in_wordpress/</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/ 在MySQL4.1下，中文的WP就会产生种种的乱码问题。 一个程序（ PHP，CGI 等）与MySQL建立连接后，这个程序发送给MySQL的数据采用的是什么字符集，MySQL 是无从得知的。所以解决乱码问题的根本就是我们在程序中告诉MySQL采用的编码是什么，简单的就是在程序中加入这样的一个语句： SET NAMES 'utf8'; 这个语句的效果等同于同时设定了 SET character_set_client='utf8'; SET character_set_connection='utf8'; SET character_set_results='utf8'; 为什么这么做？ 我们安装MySQL4.1时按照默认配置，那么default-character-set= utf8。在MySQL Command Line Client下查看到的查看系统的字符集和排序方式的设定为： mysql> SHOW VARIABLES LIKE ‘character_set_%’; +————————–+—————————-+ &#124; Variable_name &#124; Value &#124; +————————–+—————————-+ &#124; character_set_client &#124; latin1 &#8230; <a href="http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/">http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/</a></p>
<p>在MySQL4.1下，中文的WP就会产生种种的乱码问题。</p>
<p>一个程序（ PHP，CGI 等）与MySQL建立连接后，这个程序发送给MySQL的数据采用的是什么字符集，MySQL 是无从得知的。所以解决乱码问题的根本就是我们在程序中告诉MySQL采用的编码是什么，简单的就是在程序中加入这样的一个语句：</p>
<p><code>SET NAMES 'utf8';</code></p>
<p>这个语句的效果等同于同时设定了</p>
<p><code>SET character_set_client='utf8';<br />
SET character_set_connection='utf8';<br />
SET character_set_results='utf8';</code></p>
<p><strong>为什么这么做？</strong></p>
<p>我们安装MySQL4.1时按照默认配置，那么default-character-set= utf8。在MySQL Command Line Client下查看到的查看系统的字符集和排序方式的设定为：</p>
<p><span id="more-45"></span></p>
<blockquote><p>    mysql> SHOW VARIABLES LIKE ‘character_set_%’;<br />
    +————————–+—————————-+<br />
    | Variable_name            |            Value           |<br />
    +————————–+—————————-+<br />
    | character_set_client     | latin1                     |<br />
    | character_set_connection | latin1                     |<br />
    | character_set_database   | utf8                       |<br />
    | character_set_results    | latin1                     |<br />
    | character_set_server     | utf8                       |<br />
    | character_set_system     | utf8                       |<br />
    | character_sets_dir       | /usr/share/mysql/charsets/ |<br />
    +————————–+—————————-+<br />
    7 rows in set (0.00 sec)</p>
<p>    mysql> SHOW VARIABLES LIKE ‘collation_%’;<br />
    +———————-+——————-+<br />
    | Variable_name        |      Value        |<br />
    +———————-+——————-+<br />
    | collation_connection | latin1_swedish_ci |<br />
    | collation_database   | utf8_general_ci   |<br />
    | collation_server     | utf8_general_ci   |<br />
    +———————-+——————-+<br />
    3 rows in set (0.00 sec)</p></blockquote>
<p>按照MySQL的存储机制，数据在传输的过程中就会在latin1和utf8两种编码之间互相转换，这样就很容易的变成了乱码。我们在程序中设置了 SET NAMES ‘UTF8′，就等同于把所有的编码都设置为utf8，这样数据就没有了编码转换问题，也就没有了乱码问题了。</p>
<p><strong>在WP中的设置方法</strong></p>
<p>那么具体在WordPress中，怎么设定SET NAMES 'UTF8'呢？</p>
<p>对于PHP的MySQL系统来说，这样的修改很简单：</p>
<p>    找到wp-includes/wp-db.php</p>
<p><code>    $this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);<br />
</code></p>
<p>    //加上下面这行</p>
<p><code>    $this->query("SET NAMES 'utf8'");<br />
</code></p>
<p>这样数据在传输和存储的过程中，都不会出现乱码了。</p>
<p>然后把所有表和字段的字符集改成utf8，运行以下语句：</p>
<p><coolcode linenum="off" lang="mysql"><br />
--<br />
-- TABLE<br />
-- </p>
<p>ALTER TABLE `wp_categories`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_options`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_post2cat`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_postmeta`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_usermeta`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_categories<br />
-- </p>
<p>ALTER TABLE `wp_categories` CHANGE `cat_name` `cat_name` varchar( 55 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_categories` CHANGE `category_nicename` `category_nicename` varchar( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_categories` CHANGE `category_description` `category_description` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_comments<br />
-- </p>
<p>ALTER TABLE `wp_comments` CHANGE `comment_author` `comment_author` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_author_email` `comment_author_email` varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_author_url` `comment_author_url`  varchar( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_author_IP` `comment_author_IP`  varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_content` `comment_content` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_approved` `comment_approved` ENUM( '0', '1', 'spam' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_agent` `comment_agent` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_comments` CHANGE `comment_type` `comment_type` varchar( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_linkcategories<br />
-- </p>
<p>ALTER TABLE `wp_linkcategories` CHANGE `cat_name` `cat_name` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `auto_toggle` `auto_toggle` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `show_images` `show_images` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `show_description` `show_description` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `show_rating` `show_rating` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `show_updated` `show_updated` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `sort_order` `sort_order` varchar( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `sort_desc` `sort_desc` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `text_before_link` `text_before_link` varchar( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `text_after_link` `text_after_link` varchar( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_linkcategories` CHANGE `text_after_all` `text_after_all` varchar( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_links<br />
-- </p>
<p>ALTER TABLE `wp_links` CHANGE `link_url` `link_url` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_name` `link_name` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_image` `link_image` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_target` `link_target` varchar( 25 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_description` `link_description` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_visible` `link_visible` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_rel` `link_rel` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_notes` `link_notes` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_links` CHANGE `link_rss` `link_rss` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_options<br />
-- </p>
<p>ALTER TABLE `wp_options` CHANGE `option_name` `option_name` varchar( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_options` CHANGE `option_can_override` `option_can_override` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_options` CHANGE `option_value` `option_value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_options` CHANGE `option_description` `option_description` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_options` CHANGE `autoload` `autoload` enum( 'Y', 'N' ) CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_postmeta<br />
-- </p>
<p>ALTER TABLE `wp_postmeta` CHANGE `meta_key` `meta_key` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_postmeta` CHANGE `meta_value` `meta_value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_posts<br />
-- </p>
<p>ALTER TABLE `wp_posts` CHANGE `post_content` `post_content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_title` `post_title` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_excerpt` `post_excerpt` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_status` `post_status` enum( 'publish', 'draft', 'private', 'static', 'object', 'attachment' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `comment_status` `comment_status` enum( 'open', 'closed', 'registered_only' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `ping_status` `ping_status` enum( 'open', 'closed' ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_password` `post_password` varchar( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_name` `post_name` varchar( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `to_ping` `to_ping` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `pinged` `pinged` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_content_filtered` `post_content_filtered` text CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `guid` `guid` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_type` `post_type` varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_posts` CHANGE `post_mime_type` `post_mime_type` varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_usermeta<br />
-- </p>
<p>ALTER TABLE `wp_usermeta` CHANGE `meta_key` `meta_key` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_usermeta` CHANGE `meta_value` `meta_value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci;</p>
<p>--<br />
-- TABLE wp_users<br />
-- </p>
<p>ALTER TABLE `wp_users` CHANGE `user_login` `user_login` varchar( 60 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `user_pass` `user_pass` varchar( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `user_nicename` `user_nicename` varchar( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `user_email` `user_email` varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `user_url` `user_url` varchar( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `user_activation_key` `user_activation_key` varchar( 60 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
ALTER TABLE `wp_users` CHANGE `display_name` `display_name` varchar( 250 ) CHARACTER SET utf8 COLLATE utf8_general_ci;<br />
</coolcode></p>
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2006-07-03 -- <a href="http://www.lsproc.com/blog/mysql-encode-wordpress/" title="Mysql4.1编码详解及WordPress编码完善">Mysql4.1编码详解及WordPress编码完善</a> (1)</li><li>2006-02-26 -- <a href="http://www.lsproc.com/blog/all-restart/" title="一切又重新开始了">一切又重新开始了</a> (0)</li><li>2010-01-11 -- <a href="http://www.lsproc.com/blog/cacti_graph_with_chinese/" title="cacti 图片中文乱码问题">cacti 图片中文乱码问题</a> (2)</li><li>2008-03-18 -- <a href="http://www.lsproc.com/blog/configure_lamp/" title="lamp 相关配置 [Debian]">lamp 相关配置 [Debian]</a> (2)</li><li>2008-03-05 -- <a href="http://www.lsproc.com/blog/webalizer_graphs_bad_encode/" title="解决webalizer 汉化后图表中乱码的问题">解决webalizer 汉化后图表中乱码的问题</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>一切又重新开始了</title>
		<link>http://www.lsproc.com/blog/all-restart/</link>
		<comments>http://www.lsproc.com/blog/all-restart/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 07:05:37 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Memory]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://lost.yi.org/blog/?p=6</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/all-restart/ 昨天下午mysql出了点问题，结果导致blog的数据全部丢失，虽然有备份但是恢复回来出现很多乱码，整了半天最后还是放弃了，只好重新再来吧。 还是讨厌的InnoDB惹的祸，现在汉字改成了NCR(Numeric character reference) 来表示，以后就不怕乱码的问题了。 -- EOF -- Related Posts2006-12-27 -- 再谈Wordpress的MySQL乱码问题解决方法 (3)2010-01-11 -- cacti 图片中文乱码问题 (2)2008-03-18 -- lamp 相关配置 [Debian] (2)2008-03-05 -- 解决webalizer 汉化后图表中乱码的问题 (0)2007-11-05 -- MySQL导出导入命令的用例 (0)]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/all-restart/">http://www.lsproc.com/blog/all-restart/</a></p>
<p>昨天下午mysql出了点问题，结果导致blog的数据全部丢失，虽然有备份但是恢复回来出现很多乱码，整了半天最后还是放弃了，只好重新再来吧。<del datetime="2010-04-29T07:12:19+00:00"> 还是讨厌的InnoDB惹的祸，<a href="http://www.coolcode.cn/?p=5">现在汉字改成了NCR(Numeric character reference) 来表示</a>，以后就不怕乱码的问题了。<br />
</del>
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2006-12-27 -- <a href="http://www.lsproc.com/blog/mysql_encode_error_in_wordpress/" title="再谈Wordpress的MySQL乱码问题解决方法">再谈Wordpress的MySQL乱码问题解决方法</a> (3)</li><li>2010-01-11 -- <a href="http://www.lsproc.com/blog/cacti_graph_with_chinese/" title="cacti 图片中文乱码问题">cacti 图片中文乱码问题</a> (2)</li><li>2008-03-18 -- <a href="http://www.lsproc.com/blog/configure_lamp/" title="lamp 相关配置 [Debian]">lamp 相关配置 [Debian]</a> (2)</li><li>2008-03-05 -- <a href="http://www.lsproc.com/blog/webalizer_graphs_bad_encode/" title="解决webalizer 汉化后图表中乱码的问题">解决webalizer 汉化后图表中乱码的问题</a> (0)</li><li>2007-11-05 -- <a href="http://www.lsproc.com/blog/mysql_export_and_import/" title="MySQL导出导入命令的用例">MySQL导出导入命令的用例</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/all-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

