<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/main.xsl"?>
<b:blog xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://blog.othree.net"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://blog.othree.net http://blog.othree.net/blooog.xsd">
	<b:blogTitle>O3noBLOG</b:blogTitle>
	<b:blogDescription></b:blogDescription>
	<b:entries>
		<b:entriesMeta>
			<b:listType>s</b:listType>
			<b:listData listID="000333" baseName="zh-tw-case-insensitive">zh-tw還是zh-TW</b:listData>

			<b:previous>
				<b:mTitle>碩士學位，幾乎入手</b:mTitle>
				<b:mDate>2006/07/16</b:mDate>
				<b:mBase>master</b:mBase>
			</b:previous>


			<b:next>
				<b:mTitle>svn+trac</b:mTitle>
				<b:mDate>2006/08/12</b:mDate>
				<b:mBase>svntrac</b:mBase>
			</b:next>

		</b:entriesMeta>
		<b:entry entryID="000333" baseName="zh-tw-case-insensitive">
			<b:author>
				<b:authorName>othree</b:authorName>
				<b:authorEmail>othree@gmail.com</b:authorEmail>
				<b:authorUrl></b:authorUrl>
			</b:author>
			<b:datetime>
				<b:date>2006-07-21</b:date>
				<b:time>22:44:48</b:time>
			</b:datetime>
			<b:category>script</b:category>

			<b:CommentsAccepted>1</b:CommentsAccepted>



			<b:PingsAccepted>1</b:PingsAccepted>


			<b:title>zh-tw還是zh-TW</b:title>
			<b:content>
				<b:summary>剛剛看了Jedi的好孩子的網頁設計的第八課，註解及標籤屬性，裡面提到了xml:lang這個用來標示標籤內容使用語言的屬性，而這個屬性的內容可以是簡單的兩個代表某種語言的英文字，使用的是ISO 639.2 : Codes for the　Representation of Names　of Languages這個標準，例如中文是zh。更詳細的話還可以包含國碼，使用的是ISO 3166 : English country names and code elements這個標準，以台灣為例，台灣的國碼是TW，而兩個代碼是用一個-合在一起，以台灣地區使用的中文為例，xml:lang屬性值就是zh-TW。 然後這有個小問題是我再接觸到lang屬性時就有的，後面的國碼似乎有人用大寫，有人用小寫，我一直無法確定到底哪怎才是正確的，今天終於確認了，其實是大小寫都可以的，其實在W3C的規範裡是說要照ISO訂的國家代碼，不過事實上ISO所制定的國家代碼並沒有限定使用大寫還是小寫，常見到大寫只是一種習慣而已，所以lang屬性的屬性值裡也沒有限定使用大寫，此一結果參照的是W3C的Language tags in HTML and XML這篇文章，裡面說：Two-letter ISO subtags indicating country are commonly written uppercase, but this is only a convention。...</b:summary>
				<b:mainContent><p>剛剛看了Jedi的<a href="http://jedi.org/blog/archives/005444.html#entry">好孩子的網頁設計</a>的第八課，註解及標籤屬性，裡面提到了xml:lang這個用來標示標籤內容使用語言的屬性，而這個屬性的內容可以是簡單的兩個代表某種語言的英文字，使用的是<a href="http://www.loc.gov/standards/iso639-2/langcodes.html"><span class="caps">ISO</span> 639.2 : Codes for the　Representation of Names　of Languages</a>這個標準，例如中文是<strong>zh</strong>。更詳細的話還可以包含國碼，使用的是<a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html"><span class="caps">ISO</span> 3166 : English country names and code elements</a>這個標準，以台灣為例，台灣的國碼是<strong>TW</strong>，而兩個代碼是用一個<strong>-</strong>合在一起，以台灣地區使用的中文為例，xml:lang屬性值就是<strong>zh-TW</strong>。</p>

<p>然後這有個小問題是我再接觸到lang屬性時就有的，後面的國碼似乎有人用大寫，有人用小寫，我一直無法確定到底哪怎才是正確的，今天終於確認了，其實是大小寫都可以的，其實在W3C的規範裡是說要照ISO訂的國家代碼，不過事實上ISO所制定的國家代碼並沒有限定使用大寫還是小寫，常見到大寫只是一種習慣而已，所以lang屬性的屬性值裡也沒有限定使用大寫，此一結果參照的是W3C的<a href="http://www.w3.org/International/articles/language-tags/">Language tags in <span class="caps">HTML </span>and <span class="caps">XML</span></a>這篇文章，裡面說：<q cite="http://www.w3.org/International/articles/language-tags/">Two-letter <span class="caps">ISO </span>subtags indicating country are commonly written uppercase, but this is only a convention</q>。</p></b:mainContent>
				<b:extendContent></b:extendContent>
			</b:content>
			<b:comments commentCount="3">

				<b:comment commentID="001584" entryID="000333">
					<b:author>
						<b:authorName>OOO</b:authorName>
						<b:authorEmail></b:authorEmail>
						<b:authorUrl>http://blog.othree.net</b:authorUrl>
					</b:author>
					<b:datetime>
						<b:date>2006-08-18</b:date>
						<b:time>12:42:04</b:time>
					</b:datetime>
					<b:content>
						<b:mainContent><p>zh-hant好像支援度不太夠@@</p></b:mainContent>
					</b:content>
				</b:comment>

				<b:comment commentID="012816" entryID="000333">
					<b:author>
						<b:authorName>Anonymous</b:authorName>
						<b:authorEmail></b:authorEmail>
						<b:authorUrl></b:authorUrl>
					</b:author>
					<b:datetime>
						<b:date>2007-03-09</b:date>
						<b:time>14:44:33</b:time>
					</b:datetime>
					<b:content>
						<b:mainContent><p>ISO 639-1 use 2-letter,ISO 639-2 use 3-letter,ISO-639-3 use 3-letter.</p></b:mainContent>
					</b:content>
				</b:comment>

				<b:comment commentID="095403" entryID="000333">
					<b:author>
						<b:authorName>b4283</b:authorName>
						<b:authorEmail></b:authorEmail>
						<b:authorUrl></b:authorUrl>
					</b:author>
					<b:datetime>
						<b:date>2008-11-20</b:date>
						<b:time>21:11:48</b:time>
					</b:datetime>
					<b:content>
						<b:mainContent><p>在 XML 中 UTF-8 和 utf-8 是不同的 @@;</p></b:mainContent>
					</b:content>
				</b:comment>

			</b:comments>
			<b:trackbacks trackbackCount="0" trackbackURL="http://othree.net/cgi-bin/mt/mt-tb.cgi/332">

			</b:trackbacks>
		</b:entry>
	</b:entries>
</b:blog>