YORKXIN×YORKXIN

鴨七的人生,不是夜市人生

從台大榜單得 (偽) Unicode 技術學問

with 11 comments

八十台大,前進百大 之 偉大的台大連榜單都很偉大啊!!

Picture 2.png

單獨打「周」或「維」都找得到,怎麼把全名打上去就找不到啦?

Picture 4.png

Picture 3.png

五樓你說說看為甚麼找不到名字勒?

難道我打出來的「周若維」不是那個「周若維」嗎!

答案是,真的不一樣!

有時候你不能相信自己的眼睛,需要借助一些神兵利器,例如… Hex Editor …

這裡先把神秘的「若」複製到剪貼簿裏面:

Picture 6.png

接下來開啟十六進位編輯器,例如 MadEdit,然後把文字編碼設定為 Unicode UTF-32 Big Endian (這樣可以直接看到 Unicode 的U+XXXXX 值,如果用 UTF-8 還需要換算),用力給他貼上:

Picture 8.png

這裡我們看到一個貌似正常的「若」。接著我們切換到 Hex 模式

Picture 7.png

看到的是 00 00 F9 74,記住這個值。

接著切回文字模式,在那個「若」旁邊用注音打一個「若」

Picture 9.png

疑疑?那個草頭好像有點不一樣?

再說一次,不要對你的眼睛太有自信,咱們再切換到 Hex 模式:

Picture 10.png

這就是真相!!

左邊是我們從榜單複製過來的「若」,右邊是我們自己打出來的「若」;

左邊的編碼是 00 00 F9 74 ,右邊的是… 00 00 82 E5

竟然編碼不一樣!

五樓你說說看為甚麼不一樣!

既然鬧雙胞,當然要驗明正身。

在中研院的全字庫網站透過注音搜尋,是的,你會看到兩個「若」,點進去看它的 Unicode 碼,其中一個是 (U+82E5),另一個是「若」(U+2F998)。

當然我們現在知道 U+82E5 是我們用注音打出來的字

Picture 11.png

可是那個奇怪的「若」勒?

照那個編碼去看,它應該是 U+F974。可是全字庫的網站上都沒有啊?

李組長:不要再叫我皺眉頭!

沒問題,俺請教了 Google 大神、維基大神和 Unihan Database,終於讓我找到這神秘的「若」:

若,U+F974

屬於 CJK Compatibility Ideographs

五樓你問我這是啥鬼?

我也不知道這是啥鬼。但在開始研究之前,我要先問一句

台大你幹嘛標新立異啊!

這已經造成搜尋上的麻煩了你知道嗎!

而且還一大坨字,從 U+F900 佔到 U+FA2D,這是怎樣?

Picture 12.png

根據維基百科的說法:

CJK Compatibility Ideographs

Usually, compatibility characters are those that would not have been encoded except for compatibility and round-trip convertibility with other standards. However, the amount of CJK ideographs within any non-Unicode standard is too big to fit into Unicode’s CJK Compatibility Ideographs blocks. Instead, code points are assigned when the affected characters are approved by Unicode Consortium, but have yet to assign any code points within the CJK Unified Ideographs blocks.

這甚麼意思?我也看不懂。至於中文維基呢?

中文維基提到一件很有趣的事:

1993 年 Unicode 1.0 就已經存在 U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28 及 U+FA29 這十二個漢字,位於「相容表意文字區」中但實則獨一的漢字。

這個十二個字放到兼容區不是因為和其他字同形或為異體,而是因為它們只收錄在廠商用字中,但未有收錄在官方標準(C-, T-, J-, K-Source)中。他們有獨立的形、音、義,即「獨一」(Unique)。

我實在不是研究這方面的專家,所以就算我看了 Unicode  的 Spec 還是不懂(以下不負責翻譯):

Unicode 5.0,第 12 章, p424,並參考 UF900 的 Char Chart

CJK Compatibility Ideographs: U+F900–U+FAFF

The Korean national standard KS C 5601-1987 (now known as KS X 1001:1998), which served as one of the primary source sets for the Unified CJK Ideograph Repertoire and Ordering, Version 2.0, contains 268 duplicate encodings of identical ideograph forms to denote alternative pronunciations. That is, in certain cases, the standard encodes a single character multiple times to denote different linguistic uses. This approach is like encoding the letter “a” five times to denote the different pronunciations it has in the words hat, able, art, father, and adrift. Because they are in all ways identical in shape to their nominal counterparts, they were excluded by the IRG from its sources. For round-trip conversion with KS C 5601-1987, they are encoded separately from the primary CJK Unified Ideographs block.

簡譯:韓國國家標準 KSC 5601-1987 包含 268 個重覆的字,這些字只用於表記不同的聲音。Unicode 把這些特殊字編在這個區段裏。

按:這些字的音還真的很像,例如,從 U+F9A8 開始的這幾個字:

令 囹 寧 嶺 怜 玲 瑩 羚 聆 鈴 零 靈 領 例 禮 醴 隸

也許要用韓國話讀才能知道差在哪裡?

Another 34 ideographs from various regional and industry standards were encoded in this block, primarily to achieve round-trip conversion compatibility. Twelve of these ideographs (U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, and U+FA29) are not encoded in the CJK Unified Ideographs Areas. These 12 characters are not duplicates and should be treated as a small extension to the set of unified ideographs.

簡譯:看沒有。

Except for the 12 unified ideographs just enumerated, CJK compatibility ideographs from this block are not used in Ideographic Description Sequences.

An additional 59 compatibility ideographs are found from U+FA30..U+FA6A. They are included in the Unicode Standard to provide full round-trip compatibility with the ideographic repertoire of JIS X 0213:2000 and should not be used for any other purpose.

簡譯:我看沒有。

An additional 106 compatibility ideographs are encoded at the range U+FA70 to U+FAD9. They are included in the Unicode Standard to provide full round-trip compatibility with the ideographic repertoire of PKS 5700 parts 1, 2, and 3. They should not be used for any other purpose.

簡譯:還是看不懂。

不過在 Chart 裏頭竟然寫 DPRK compatibility ideographs

DPRK = 北韓

The names for the compatibility ideographs are also algorithmically derived. Thus the name for the compatibility ideograph U+F900 is cjk compatibility ideograph-f900.

雖然看不懂全文,不過大致上可以呼應中文維基百科所描述的:「是為了相容於若干廠商的字源,其異於國家標準者,分別列之。」

我知道我八成有誤解,看得懂的前輩還請指教。

不過既然是相容字元,那一定可以把它轉到統一字元嘛,Code Chart 上面都寫了這個字可以對應到 CJK Unified Ideograph 的哪個字,偉大的台大你們家到底有什麼程式在做這些流程的啊

好吧我承認是我自己改榜單改到快瘋掉了,每跑一個字就要重新修一次…

怒很大才上來 po 這篇,才知道這個題目要怎麼解…

作者為Chitsaou Yorkxin

2009 年 四月 14 日 星期二 於 04:19:47

張貼於電腦科學

Tagged with

11 回應

RSS訂閱留言。

  1. [...] U+F900 至 U+FAFF 的字,需特別針對這一點做處理。neither 直接拿表格來換 (偽×技術細節), or [...]

    YORKXINATED: 98 年大學甄選入學交叉查榜

    2009 年 四月 14 日 星期二 at 05:22:53

  2. 學長您真的很辛苦阿…
    真是全國高三生的福音(雖然我現在無福領受了…哭哭)
    等我上了師大可以幫您的忙(茶)

    我要赴高雄考試了
    您好好照顧自己阿,我會努力的XD

    cinnazy

    2009 年 四月 16 日 星期四 at 20:40:39





    • = =

      Chitsaou Yorkxin

      2009 年 四月 16 日 星期四 at 20:42:00

      • ㄎㄎ,我在查岡山鎮地圖啊(略為心虛)

        cinnazy

        2009 年 四月 16 日 星期四 at 20:44:30

      • 藉口 (茶

        Chitsaou Yorkxin

        2009 年 四月 16 日 星期四 at 20:45:15

  3. 第一次去總是要了解地形(汗
    我要走了這樣才乖(奔跑

    cinnazy

    2009 年 四月 16 日 星期四 at 20:47:31

  4. CINNAZY GO!
    欸我們一起師大啦一起師大啦

    對了學長我想請教
    師大為什麼那麼慢才放榜啊!
    我等政大已經很痛苦了何況師大
    師大是故意的嗎?為什麼為什麼
    還是真的就那麼慢?囧

    Voglia

    2009 年 四月 17 日 星期五 at 23:29:21

    • 我不知道啊….

      Chitsaou Yorkxin

      2009 年 四月 17 日 星期五 at 23:36:17

  5. [...] Unicode Chinese Compatible Characters 區段的字,而不是我們常用的那些字(技術概說) 。當這份榜單不需要理會中文的時候 [...]

  6. 意思是說 台大還把從成大那邊報名系統的名字
    轉成那些奇怪編碼的字?

    Poyu

    2009 年 五月 15 日 星期五 at 17:35:12

    • 不是

      我猜是某些老舊的 Unicode 軟體對漢字支援不足產生的問題

      Chitsaou Yorkxin

      2009 年 五月 15 日 星期五 at 17:41:20


發表迴響