<?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>www.chaoman.com &#187; Programming 程式設計</title>
	<atom:link href="http://www.chaoman.com/category/everything-about-technical/programming-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chaoman.com</link>
	<description>chaoman&#039;s technical materials and life experience</description>
	<lastBuildDate>Wed, 23 Mar 2011 06:45:44 +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>PHP 計算中文字的筆劃</title>
		<link>http://www.chaoman.com/2010/06/php-%e8%a8%88%e7%ae%97%e4%b8%ad%e6%96%87%e5%ad%97%e7%9a%84%e7%ad%86%e5%8a%83/</link>
		<comments>http://www.chaoman.com/2010/06/php-%e8%a8%88%e7%ae%97%e4%b8%ad%e6%96%87%e5%ad%97%e7%9a%84%e7%ad%86%e5%8a%83/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 21:14:32 +0000</pubDate>
		<dc:creator>chaoman</dc:creator>
				<category><![CDATA[Programming 程式設計]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[中文字]]></category>
		<category><![CDATA[筆劃]]></category>

		<guid isPermaLink="false">http://www.chaoman.com/?p=122</guid>
		<description><![CDATA[綜合了 Ning 大大 http://yesning.com和水電工大大http://artvine.org/forum/index.php?topic=129.0的PHP程式樣本後，終於可以寫出個PHP小程式算出中文筆劃數了。 水電工大大的筆劃內碼表是倚天提供的，內容可以在i18n上找的到http://bbs.ecstart.com/thread-15553-1-1.html. 但是現在般的電腦都是用 UTF-8作編表，所以單用水電工大大的程式是不行把筆劃算出來的。要採用 Ning大大的iconv()才行。 iconv() 可以把字串string的編碼轉變成另一個格式，我們的情形就是把UTF8轉成Big5. 使用法如下： 1string iconv &#40; string $in_charset , string $out_charset , string $str &#41; 完整程式碼如下： 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091function get_chnnum&#40;$word&#41; &#123; //UTF-8的話先轉成BIG5 $word = iconv&#40;'utf-8','big5//IGNORE',$word&#41;; if&#40;strlen&#40;$word&#41; != 2&#41; return false; if&#40;ord&#40;$word&#91;0&#93;&#41; &#38;lt; 0xA1&#41; return false; $code = hexdec&#40;bin2hex&#40;$word&#41;&#41;; $StrokeArray=Array&#40; Array&#40;1 ,0xA440,0xA441&#41;, ## 常用字區 Array&#40;2 ,0xA442,0xA453&#41;, Array&#40;3 ,0xA454,0xA47E&#41;, Array&#40;4 ,0xA4A1,0xA4FD&#41;, [...]]]></description>
		<wfw:commentRss>http://www.chaoman.com/2010/06/php-%e8%a8%88%e7%ae%97%e4%b8%ad%e6%96%87%e5%ad%97%e7%9a%84%e7%ad%86%e5%8a%83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL UTF8 issue</title>
		<link>http://www.chaoman.com/2009/06/mysql-utf8-issue/</link>
		<comments>http://www.chaoman.com/2009/06/mysql-utf8-issue/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 20:06:10 +0000</pubDate>
		<dc:creator>chaoman</dc:creator>
				<category><![CDATA[Programming 程式設計]]></category>

		<guid isPermaLink="false">http://chaoman.wordpress.com/?p=24</guid>
		<description><![CDATA[I was asked to identify an issue between our PHP web form and MySQL DB. The web form is based in Japanese of UTF-8 encoding and we have all database character set and collation set to UTF8_Unicode_Ci. However, when we finish input the fields in Japanese, the data in MySQL is shown in junk character. [...]]]></description>
		<wfw:commentRss>http://www.chaoman.com/2009/06/mysql-utf8-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

