行政院主計處研究報告 中文字碼標準化及互轉機制之探討 ·...

68
編號:97 06 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 電子中心研究訓練組 余保倫、周智禾 行政院主計處 印製日期:104 5 29

Upload: others

Post on 28-Oct-2019

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

編號97 年 06

行政院主計處研究報告

中文字碼標準化及互轉機制之探討

電子中心研究訓練組

余保倫周智禾

行政院主計處

印製日期104 年 5 月 29 日

目 錄

目 錄一

摘 要二

表 目 錄三

圖 目 錄四

第一章 緒論1

第一節 研究背景與動機1

第二節 研究目的2

第三節 研究內容4

第二章 文獻探討5

第一節 大五碼 (Big5) 5

第二節 國際通用碼 (Unicode) 8

第三節 五大行政資訊系統編碼12

第四節 國家標準交換碼 (CNS 11643) 15

第五節 WebServices17

第三章 研究方法與步驟21

第一節 研究架構21

第二節 中文內碼對照表服務25

第三節 字串編碼轉換服務28

第四節 純文字檔編碼轉換服務31

第四章 研究成果35

第一節 對照表上傳35

第二節 字串轉碼42

第三節 純文字檔轉碼44

第四節 使用他人造字集50

第五章 結論53

第一節 研究發現53

第二節 研究建議54

參考文獻56

附錄57

摘 要

全字庫網站自 88 年 7 月開放使用除了提供以 CNS 11643 為核心的各種字

碼資訊之外亦發展出許多元件工具供各界參考與加值應用為國內解決資訊

系統中文交換與處理上的關鍵資訊服務之ㄧ為了使民眾在處理新增造字時能

符合 CNS 11643 之內容遂發展出全字庫軟體包等功能作為使用者個人字碼

標準化的基本工具用以加速達成國內字碼標準化的目標

另一方面為使民眾與各政府機關能直接管理與轉換所需之字碼文件資

料藉以解決中文交換與處理上的需求本研究將進行轉碼系統之開發本系統

包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟體(內含於「全

字庫軟體包」中)並提供三項功能對照表上傳服務字串轉碼功能純文字檔

轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其核

心技術使用 CNS 11643 交換碼作為編碼轉換的媒介

我們將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字碼

轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

表 目 錄

表格 1編碼種類3

表格 2BIG-5 碼的字集 7

表格 3國內常見的編碼系統12

表格 4字碼對照表 Binary 檔格式26

表格 5字碼對照表文字檔檔案格式26

表格 6機關自造字對照表之格式說明36

表格 7字串轉碼的種類43

表格 8純文字檔轉碼的種類44

表格 9造字集分享的步驟51

圖 目 錄

圖 1本研究系統架構圖4

圖 2BIG-5 碼使用範圍表 6

圖 3ISO 10646 之基本多語文字面(BMP)概觀 9

圖 4ISO 10646 的編碼架構 10

圖 5SOAP 訊息架構 19

圖 6文件轉換電子閘門系統架構圖23

圖 7資訊網服務系統建置圖25

圖 8字串編碼轉換服務系統架構圖29

圖 9純文字檔編碼轉換服務的系統架構圖32

圖 10使用者註冊36

圖 11機關造字管理者上傳對照表37

圖 12機關造字管理者新增其所屬的單位或系統38

圖 13全字庫軟體包下載頁面38

圖 14字碼查詢結果頁面(系統已包含該字碼)39

圖 15字碼查詢結果頁面(系統未包含該字碼)40

圖 16使用者上傳造字集41

圖 17造字集查詢頁面41

圖 18字串轉碼頁面42

圖 19開啟 EUC 編碼純文字檔案之畫面45

圖 20純文字檔案轉碼畫面46

圖 21EUC 編碼文件的轉碼結果47

圖 22使用者所轉入的四個罕用字47

圖 23使用者所繕打的文件48

圖 24使用者 Alice 開啟文件的畫面 48

圖 25使用者文件的轉碼畫面49

圖 26使用者文件的轉碼結果49

圖 27造字集下載畫面51

圖 28造字集切換畫面52

圖 29瀏覽文件畫面52

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 2: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

目 錄

目 錄一

摘 要二

表 目 錄三

圖 目 錄四

第一章 緒論1

第一節 研究背景與動機1

第二節 研究目的2

第三節 研究內容4

第二章 文獻探討5

第一節 大五碼 (Big5) 5

第二節 國際通用碼 (Unicode) 8

第三節 五大行政資訊系統編碼12

第四節 國家標準交換碼 (CNS 11643) 15

第五節 WebServices17

第三章 研究方法與步驟21

第一節 研究架構21

第二節 中文內碼對照表服務25

第三節 字串編碼轉換服務28

第四節 純文字檔編碼轉換服務31

第四章 研究成果35

第一節 對照表上傳35

第二節 字串轉碼42

第三節 純文字檔轉碼44

第四節 使用他人造字集50

第五章 結論53

第一節 研究發現53

第二節 研究建議54

參考文獻56

附錄57

摘 要

全字庫網站自 88 年 7 月開放使用除了提供以 CNS 11643 為核心的各種字

碼資訊之外亦發展出許多元件工具供各界參考與加值應用為國內解決資訊

系統中文交換與處理上的關鍵資訊服務之ㄧ為了使民眾在處理新增造字時能

符合 CNS 11643 之內容遂發展出全字庫軟體包等功能作為使用者個人字碼

標準化的基本工具用以加速達成國內字碼標準化的目標

另一方面為使民眾與各政府機關能直接管理與轉換所需之字碼文件資

料藉以解決中文交換與處理上的需求本研究將進行轉碼系統之開發本系統

包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟體(內含於「全

字庫軟體包」中)並提供三項功能對照表上傳服務字串轉碼功能純文字檔

轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其核

心技術使用 CNS 11643 交換碼作為編碼轉換的媒介

我們將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字碼

轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

表 目 錄

表格 1編碼種類3

表格 2BIG-5 碼的字集 7

表格 3國內常見的編碼系統12

表格 4字碼對照表 Binary 檔格式26

表格 5字碼對照表文字檔檔案格式26

表格 6機關自造字對照表之格式說明36

表格 7字串轉碼的種類43

表格 8純文字檔轉碼的種類44

表格 9造字集分享的步驟51

圖 目 錄

圖 1本研究系統架構圖4

圖 2BIG-5 碼使用範圍表 6

圖 3ISO 10646 之基本多語文字面(BMP)概觀 9

圖 4ISO 10646 的編碼架構 10

圖 5SOAP 訊息架構 19

圖 6文件轉換電子閘門系統架構圖23

圖 7資訊網服務系統建置圖25

圖 8字串編碼轉換服務系統架構圖29

圖 9純文字檔編碼轉換服務的系統架構圖32

圖 10使用者註冊36

圖 11機關造字管理者上傳對照表37

圖 12機關造字管理者新增其所屬的單位或系統38

圖 13全字庫軟體包下載頁面38

圖 14字碼查詢結果頁面(系統已包含該字碼)39

圖 15字碼查詢結果頁面(系統未包含該字碼)40

圖 16使用者上傳造字集41

圖 17造字集查詢頁面41

圖 18字串轉碼頁面42

圖 19開啟 EUC 編碼純文字檔案之畫面45

圖 20純文字檔案轉碼畫面46

圖 21EUC 編碼文件的轉碼結果47

圖 22使用者所轉入的四個罕用字47

圖 23使用者所繕打的文件48

圖 24使用者 Alice 開啟文件的畫面 48

圖 25使用者文件的轉碼畫面49

圖 26使用者文件的轉碼結果49

圖 27造字集下載畫面51

圖 28造字集切換畫面52

圖 29瀏覽文件畫面52

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 3: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

摘 要

全字庫網站自 88 年 7 月開放使用除了提供以 CNS 11643 為核心的各種字

碼資訊之外亦發展出許多元件工具供各界參考與加值應用為國內解決資訊

系統中文交換與處理上的關鍵資訊服務之ㄧ為了使民眾在處理新增造字時能

符合 CNS 11643 之內容遂發展出全字庫軟體包等功能作為使用者個人字碼

標準化的基本工具用以加速達成國內字碼標準化的目標

另一方面為使民眾與各政府機關能直接管理與轉換所需之字碼文件資

料藉以解決中文交換與處理上的需求本研究將進行轉碼系統之開發本系統

包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟體(內含於「全

字庫軟體包」中)並提供三項功能對照表上傳服務字串轉碼功能純文字檔

轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其核

心技術使用 CNS 11643 交換碼作為編碼轉換的媒介

我們將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字碼

轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

表 目 錄

表格 1編碼種類3

表格 2BIG-5 碼的字集 7

表格 3國內常見的編碼系統12

表格 4字碼對照表 Binary 檔格式26

表格 5字碼對照表文字檔檔案格式26

表格 6機關自造字對照表之格式說明36

表格 7字串轉碼的種類43

表格 8純文字檔轉碼的種類44

表格 9造字集分享的步驟51

圖 目 錄

圖 1本研究系統架構圖4

圖 2BIG-5 碼使用範圍表 6

圖 3ISO 10646 之基本多語文字面(BMP)概觀 9

圖 4ISO 10646 的編碼架構 10

圖 5SOAP 訊息架構 19

圖 6文件轉換電子閘門系統架構圖23

圖 7資訊網服務系統建置圖25

圖 8字串編碼轉換服務系統架構圖29

圖 9純文字檔編碼轉換服務的系統架構圖32

圖 10使用者註冊36

圖 11機關造字管理者上傳對照表37

圖 12機關造字管理者新增其所屬的單位或系統38

圖 13全字庫軟體包下載頁面38

圖 14字碼查詢結果頁面(系統已包含該字碼)39

圖 15字碼查詢結果頁面(系統未包含該字碼)40

圖 16使用者上傳造字集41

圖 17造字集查詢頁面41

圖 18字串轉碼頁面42

圖 19開啟 EUC 編碼純文字檔案之畫面45

圖 20純文字檔案轉碼畫面46

圖 21EUC 編碼文件的轉碼結果47

圖 22使用者所轉入的四個罕用字47

圖 23使用者所繕打的文件48

圖 24使用者 Alice 開啟文件的畫面 48

圖 25使用者文件的轉碼畫面49

圖 26使用者文件的轉碼結果49

圖 27造字集下載畫面51

圖 28造字集切換畫面52

圖 29瀏覽文件畫面52

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 4: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

表 目 錄

表格 1編碼種類3

表格 2BIG-5 碼的字集 7

表格 3國內常見的編碼系統12

表格 4字碼對照表 Binary 檔格式26

表格 5字碼對照表文字檔檔案格式26

表格 6機關自造字對照表之格式說明36

表格 7字串轉碼的種類43

表格 8純文字檔轉碼的種類44

表格 9造字集分享的步驟51

圖 目 錄

圖 1本研究系統架構圖4

圖 2BIG-5 碼使用範圍表 6

圖 3ISO 10646 之基本多語文字面(BMP)概觀 9

圖 4ISO 10646 的編碼架構 10

圖 5SOAP 訊息架構 19

圖 6文件轉換電子閘門系統架構圖23

圖 7資訊網服務系統建置圖25

圖 8字串編碼轉換服務系統架構圖29

圖 9純文字檔編碼轉換服務的系統架構圖32

圖 10使用者註冊36

圖 11機關造字管理者上傳對照表37

圖 12機關造字管理者新增其所屬的單位或系統38

圖 13全字庫軟體包下載頁面38

圖 14字碼查詢結果頁面(系統已包含該字碼)39

圖 15字碼查詢結果頁面(系統未包含該字碼)40

圖 16使用者上傳造字集41

圖 17造字集查詢頁面41

圖 18字串轉碼頁面42

圖 19開啟 EUC 編碼純文字檔案之畫面45

圖 20純文字檔案轉碼畫面46

圖 21EUC 編碼文件的轉碼結果47

圖 22使用者所轉入的四個罕用字47

圖 23使用者所繕打的文件48

圖 24使用者 Alice 開啟文件的畫面 48

圖 25使用者文件的轉碼畫面49

圖 26使用者文件的轉碼結果49

圖 27造字集下載畫面51

圖 28造字集切換畫面52

圖 29瀏覽文件畫面52

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 5: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

圖 目 錄

圖 1本研究系統架構圖4

圖 2BIG-5 碼使用範圍表 6

圖 3ISO 10646 之基本多語文字面(BMP)概觀 9

圖 4ISO 10646 的編碼架構 10

圖 5SOAP 訊息架構 19

圖 6文件轉換電子閘門系統架構圖23

圖 7資訊網服務系統建置圖25

圖 8字串編碼轉換服務系統架構圖29

圖 9純文字檔編碼轉換服務的系統架構圖32

圖 10使用者註冊36

圖 11機關造字管理者上傳對照表37

圖 12機關造字管理者新增其所屬的單位或系統38

圖 13全字庫軟體包下載頁面38

圖 14字碼查詢結果頁面(系統已包含該字碼)39

圖 15字碼查詢結果頁面(系統未包含該字碼)40

圖 16使用者上傳造字集41

圖 17造字集查詢頁面41

圖 18字串轉碼頁面42

圖 19開啟 EUC 編碼純文字檔案之畫面45

圖 20純文字檔案轉碼畫面46

圖 21EUC 編碼文件的轉碼結果47

圖 22使用者所轉入的四個罕用字47

圖 23使用者所繕打的文件48

圖 24使用者 Alice 開啟文件的畫面 48

圖 25使用者文件的轉碼畫面49

圖 26使用者文件的轉碼結果49

圖 27造字集下載畫面51

圖 28造字集切換畫面52

圖 29瀏覽文件畫面52

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 6: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

1

第一章 緒論

第一節 研究背景與動機

電腦的發展是始於西方在電腦上所使用的文字自然也是以西方文字為主

其中最普及者又屬英文實際上電腦的內部運作是以 0 和 1 的數值系統進行控

制英美語系的電腦多以 ASCII 碼表示ASCII 係以一個位元組(Byte)的 7 個位

元(Bit)表示一個字共可組成 128 個字對拼音的英語系統全部的英文字母

數字符號控制符號確已足夠使用然而對於使用中文系統的國家而言不僅

中文字形筆劃較英文複雜字數更是多出數倍以上單一的位元組不足以表達全

部的中文字因此產生了二個三個或四個位元組來表示中文字的編碼系統[11]

目前國內電腦所使用的編碼系統繁多例如最常見的大五碼(BIG-5)編碼

系統市面上大多數的套裝軟體都是在大五碼內碼系統所發展出來的國內許多

政府機關亦有自己的編碼系統如財稅資料中心的財稅碼及稅務碼公路監理

的電信碼戶政 EUC 碼等為了解決國內政府機關間因使用不同的編碼系統

所造成文件交換困難的問題而制定的國家標準交換碼「CNS 11643」[16]另

外就是被視為未來統一的編碼標準萬國碼(Unicode)[4]

擁有了中文的編碼系統就已解決了電腦處理中文字的問題嗎事實上不盡

然是由於各種不同編碼系統的編碼方式以及所擁有的中文字不盡相同造成了

文件交換的困難關於這個問題可透過國家標準交換碼「CNS 11643」來解決

只要將每個不同編碼的系統與 CNS 11643 之間建立好對照表當文件要進行交

換時先將來原始檔案轉換成 CNS 11643 交換碼格式再由 CNS 11643 轉成目

的檔的編碼格式即可目前國內政府機關的電子公文交換就是採用此種機制

[18]然而不同編碼系統所能容納的中文字數相當有限再加上中文字的數量

隨時間的演進不斷擴增造成編碼系統所內建的中文字已不敷使用目前市面上

已有許多產品提供了造字功能讓使用者可依自己的需求將所缺的中文字加入到

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 7: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

2

編碼系統中全字庫網站上亦提供了相關工具解決此方面的問題加入自造字後

的編碼系統讓原本只須單純的利用 CNS 11643 來解決的檔交換問題變得更複

雜了

目前國內在市面上雖然已有許多提供使用者自造字功能的軟體但各家廠商

所提供的字型資料不盡完整且大多須付費才能使用若使用某一造字產品其

所產出的文件亦很難在另一台電腦上正確無誤的呈現本研究主要就是針對這些

問題提出實務上的解決方式

第二節 研究目的

全字庫[8]為國內解決資訊系統中文交換與處理上的關鍵資訊服務之ㄧ現

除已提供以 CNS 11643 為核心的各種字碼資訊外亦發展出許多程式元件供

各界參考與應用為了使民眾在處理新增造字時能符合 CNS 11643 之內容

遂發展出全字庫軟體包等功能作為使用者個人字碼標準化的基本工具用以加

速達成國內字碼標準化的目標

另外為了使民眾與各政府機關能直接管理與轉換所需之字碼文件資料

藉以解決中文交換與處理上的需求本研究開發出三種操作介面包括應用程

式介面(Application Program InterfaceAPI)函式庫網頁以及使用者介面(User

InterfaceUI)軟體並提供三項功能對照表上傳服務字串轉碼功能及純文字

檔轉碼功能本研究主要以 ClientServer 為開發的架構並以 WebService 為其

核心技術使用 CNS 11643 交換碼作為編碼轉換的媒介我們將所要處理的編

碼種類概分為下列三種

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 8: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

3

表格 1編碼種類

編碼種類 對照表內容

通用編碼 CNS 國標碼大五碼Unicode 等

政府機關(五大行政資訊系統)

共用字集

戶政 EUC 碼財稅交換碼稅務內碼工商

碼電信碼地政

機關個人自造字 機關(含政府及公司行號)自造字一般使用者

的個人自造字

本研究將建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照

表資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其字

碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個人電腦

中該軟體會自動建立自造字對照表資料這三類的對照表將存放於全字庫網站

以便於集中控管且提供機關與個人有關自造字對照表上傳的功能讓使用者可

以將機關或個人所使用的自造字對照上傳至全字庫網站另外提供應用程式介

面函式庫(給程式開發者)網頁以及使用者介面軟體(內含於全字庫軟體包中)給

各機關與個人使用轉碼功能主要是針對通用編碼政府機關(五大行政資訊系

統)共用字集機關個人自造字這三種編碼系統的字串或文件之間進行互轉其

系統架構圖如圖 1 所示

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 9: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

4

圖 1本研究系統架構圖

本研究主要的目的在於提供完整的對照表建立機制不管是機關的造字管理

者或是一般的個人使用者均可透過此機制將自造字對照表上傳至全字庫網站

以期建立完整的對照表資料透過與 CNS 11643 的對應讓中文字碼得以標準

化另一方面亦提供了轉碼的功能讓不同編碼系統所產製的字串與純文字檔

均可正確的進行互轉達到溝通無障礙的目標

第三節 研究內容

本研究的內容陳述如後在下一章我們將介紹目前國內一些常見的編碼系

統和其現況以及初步探討本研究所使用到的 WebServices 技術第三章部分則

是主要介紹本次研究的方法及其步驟本研究所實作出來的成果部分將在展現在

第四章中最後一章則是結論部分

應用程式(API)

網頁(Web)

全字庫軟體包

對照表上傳

字串轉碼

純文字檔轉

WebServices

使用者

使用方式 功能

標準編碼

機關個人

自造字

五大行政資

訊系統字集

轉碼功能

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 10: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

5

第二章 文獻探討

第一節 大五碼 (Big5)

民國七十二年 IBM5550[10]第一部可處理漢字功能的個人電腦出現開啟

國內發展中文電腦的年代財團法人資訊工業策進會[14]與國內 13 家業者合作

進行的「五大軟體專案」時以「通用漢字標準交換碼」之前身「常用字碼集」

為藍本發表了一套專為五大中文套裝軟體所設計的中文內碼Big5 遂成為我

國中文電腦的業界標準

原 Big5 所公佈之 13053 個中文字408 個符號及 33 個控制字元的字集

漢字總數經查驗後應加上 0xA259-0xA261 的度量衡單位用字 (兙兛兞兝

兡兣嗧瓩糎) 減去「兀」(0xC94A)和「嗀」(0xDDFC)兩個重覆字後

應為 13060 字為解決各廠家如微軟倚天宏碁等中文系統廠商在擴充上的

需要推出不同版本 Big5 的現象經濟部標準檢驗局委託財團法人中文數位化

技術推廣基金會[13]修訂 Big5 編碼字元表正式定名為「Big5-2003」由於

原 Big5 碼 13053 個中文字中調整後的總字數為 13051 個中文字同時也新

增了 30 個數字元號24 個部首14 個罕用符號268 個日本假名以及 34

個表格符號共 370 個符號

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 11: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

6

圖 2BIG-5 碼使用範圍表

BIG5 碼使用兩位元組之內碼系統共可定義 19782 個字碼其高低

位元元組為高位元組 0x81~0xFE 與低位元組 0x40~0x7E0xA1-0xFE第一位

元組的值使用 16 進制之 A1~FE 之間第二位元組在 40~7E 和 A1~FE 之

間分別擺放標準字特殊符號及使用者造字等性質用字分別說明如下表

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 12: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

7

表格 2BIG-5 碼的字集

使用範圍 字數 保留範圍 字數

常用字 A440~C67E 5401

次常用字 C940~F9D5 7652

倚天字 F9D6~F9FE 41

符號 A140~A3BF 408

控制碼 A3C0~A3E0 33 A3E1~A3FE 30

使用者造字 第一段 FA40~FEFE 785

使用者造字 第二段 8E40~A0FE 2983

使用者造字 第三段 8140~8DFE 2041

使用者造字 第四段 C6A1~C8FE 408

行政院主計處電子處理資料中心鑑於政府機關公文及資訊系統進行電子傳

遞時因各單位擴充 Big5 碼之自造字而無法交換處理協商行政院研究發展考

核委員會[9]成立「Big5 碼字集擴編計畫」專案處理搜納公務部門在一般文書

上最常用之自造字加以編訂民國八十六年七月擴編完成「Big5+碼」又為能

使該字集能在資訊業務上正常運作於是從 Big5+中挑選 3954 個字編訂 Big5

碼造字區碼位完成 Big5 碼補充字集(Big5 Extension Character Set)的建立工作

亦即是公務上所熟知的 Big5E 字集本字集編定於 PC 系統廠商所規劃之造字編

碼區字碼區域由 0x8140~0x 875B0x 8E43~0x 8FFE0x 9040~0x 9FFE

0xA040~0xA0FE 造字編碼之四個區塊

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 13: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

8

第二節 國際通用碼 (Unicode)

各國為處理資訊化的工作大多制訂了本土使用的字元碼其依各國語言的

字元集的大小早期採用單位元組或多位元組的編碼型態做為數位化處理之用

單位元元組字元碼以 ISOIEC 8859 系列的八位元元單位元組字元碼為主多位

元組交換碼則多遵循 ISOIEC 2022 的編碼結構在國際數位化資料交流的需求

下形成發展多語言整合性字元集的共識在七十三年國際 ISO 組織[1]正式

開始制定國際字元集編碼標準此項工作交由 ISOIEC JTC1 SC2WG2 工作分

組負責編訂出 UCS(Universal Multiple-Octet Coded Character Set)編號訂為

ISOIEC 10646本項標準為世界各種主要語文的字元編訂出統一的內碼

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 14: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

9

圖 3ISO 10646 之基本多語文字面(BMP)概觀

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 15: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

10

UCS(或稱 UCS-4)採連續編碼不再避開 C0 和 C1 控制碼區以 32 個

位元為基礎的編碼方式並劃分成四組八位元以群(G-octet)字(P-octet)

列(R-octet)和格(C-octet)分別代表編碼結構中的群組(group)字面(plane)

列(row)與格(cell)的關係(如右圖)每一群組由 256 個字面所組成每

一個字面由 256 列所組成每一列則包含 256 格每一格為一個碼位兩個

碼位 FFFEh 和 FFFFh 保留不用所以整個編碼空間總共 256times128 共 32768

個字面每個字面為 256times254共 65534個碼位整個UCS可訂出 65534times32768

共 2147418112 個碼位目前僅有第 0 群組的第 0 字面的基本多語文字面

(BMPBasic Multi-lingual Plane)第 1 字面第 2 字面和第 14 字面真正收

容編碼字元

圖 4ISO 10646 的編碼架構

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 16: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

11

八十二年公佈 ISO 10646 國際編碼標準的首個版本全名是「ISOIEC

10646-11993 」 八 十 九 年 發 表 了 「 ISOIEC 10646-12000 」「 ISOIEC

10646-12000」是「ISOIEC 10646-11993」的更新版本它包括了「ISOIEC

10646-11993」20902 個表意文字及擴展區 A6582 個表意文字共 27484 字

九十年發表「ISOIEC 10646-22001」補充擴展區 B 42711 個表意文字使 ISO

10646 表意文字總數超過 7 萬字九十三年發表了「ISOIEC 106462003」合併

「ISOIEC 10646-12000」和「ISOIEC 10646-22001」兩版本成為單一發行本[2]

UCS 共搜錄拼音文字表意文字各種符號和控制字元等四種字元其中

WG2 將表意文字蒐集整理與比對工作交由其下所設之表意文字書記組

(Ideograph Rapporteur GroupIRG)[3]專責處理在 ISO 中所認定的表意文字

係指源自於中國東亞各國正在使用或曾經使用過的漢字包括台灣中國大陸

日本南北韓越南新加坡和港澳等地區[15]IRG 為我國與國際標準編碼組

織重要的聯繫視窗目前正透該組織申請國內戶地政用字納於擴展區 C 及 D

兩區內

與 ISO10646 息息相關的 Unicode是在七十七年 Xerox 公司建議以將電腦

字元集編碼的基本單位由現行的七或八個位元擴充到 16 個位元利用 216 多達

65536 個碼位容納全世界各種語言的字元和常用符號新的字元集編碼標準被稱

為 Unicode八十年由 IBMDECSun MicroXeroxAppleMicroSoftNovell

等公司共同成立 Unicode 協會(The Unicode Consortium) [4]並由 Unicode 技術委

員會(UTCUnicode Technical Committee)從事各國字元蒐集整理編碼等工作

於是在同年發表第一版(Unicode 10)的 Unicode 標準之後 WG2 與 Unicode 協會

達成協議將 Unicode 併入 UCS 的 BMP(Basic Multi-lingual Plane 如圖)字面並

將字元的搜集整理和編碼等工作交由 WG2 負責所以後來 UCS(ISOIEC 10646)

與 Unicode 共同闡述同一個字元集

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 17: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

12

第三節 五大行政資訊系統編碼

我們將目前國內常見的編碼系統整理如下表並分別簡介國內的五大行政資

訊系統所使用的編碼

表格 3國內常見的編碼系統

資訊系統 中文編碼 字集數 編碼方式

預計新

版字集

新字申報 備註

MS Windows BIG5Unicode 2 萬以上 2~3 Bytes 70195

Linux BIG5Unicode 25 萬以上 1~4 Bytes 70195 Utf-8 運作

戶政

EUC-CSIC EUC-CSIC 7 萬以上 4 Bytes 92038 700

財稅 財稅稅務碼 1944321422 4 Bytes 2422

公路監理 電信碼 16384 2 Bytes

圖書館 CCCII 75684 3 Bytes

CNS 標準 CNS 11643 48027

(81 年版) 3 Bytes

92038

(94 年版)

國語會 4 萬

多字

五大行政約

8 千

交換碼

業界標準 BIG5BIG5E 130533954 2 Bytes BIG5-2003

ISO 標準 ISO 10646

CJK+A+B 70205 4 Bytes

我國提報 1

萬多字

至 IRG 會

議中

審查 CJK

ext C1 CNS11649

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 18: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

13

1全國民眾基本資料(EUC-CSIC)

EUC(Extend Unix Code)內碼為全國戶役政[7]單位所使用的基本字碼架構

UNIX 作業系統之內碼字碼長度 4 BYTE可納編高達七八萬的姓名用字

滿足全國人民戶籍的基本資料的存放與處理目前其編碼與 CNS 11643 呈一對

一的對應關係亦即採用了 1~15 字面每字面有 9494 碼位的編碼架構及所有

字集內容其演算法為

1st BYTE 8Eh (固定值)

2nd BYTE A0h + CNS 字面(如第三字面為 A3h)

3rd BYTE 80h + CNS high BYTE

4th BYTE 80h + CNS low BYTE

所以 EUC 碼轉換 CNS 11643 不需對照表逐筆比對只需取得 EUC 碼 2nd byte

中的 CNS 字面數(如 A3h 的代表第 3 字面)再將 EUC 碼 3rd byte 及 4th BYTE 減

80即可轉換成 CNS 11643 的編碼空間

2財稅系統 (財稅碼與稅務碼)

財稅資料中心[12]在資訊作業上所採用的內碼包含

康大碼(即 4Bytes 王安碼)約兩萬一千多字

新電信碼(3Bytes 內碼2Bytes 展示)約兩萬四千多字

稅務碼(DP 主機專用4Bytes 內碼2Bytes 展示)約一萬八千多字

IBM 新主機碼(2Bytes)約兩萬多字

將上述碼之交集約一萬八千多字彙整成國稅與稅捐稽徵機關資訊系統發展

時之字碼基礎稱為稅務碼依循 ISO 2022 標準 2 位元組的編碼架構分為

A1A1H ~ FEFEHA121H ~ FE7EH 及以 FEA6 當前導碼加上 A1A1H~FEFEH 三

個區段

財稅碼是以 4 Bytes 流水號方式第一碼為 0~9 與 A~J 其於各碼為 0~9 的中

文編碼格式所編制的交換碼(0~j289)約一萬九千多字主要用以整合內部訊息

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 19: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

14

與文件交換互通所使用的中文交換碼依據 94 年 4 月 26 日所出表之財稅碼序字

碼冊稅務碼共有 21422 個字財稅碼共有 19443 個字其內有 2422 個字尚

未納編於 CSIC 中正申請編納於字面內

3交通事業(電信碼)

交通部數據通信所為配合工公共數據處理公路監理[6]等資訊系統所編訂

出數據通信中文電碼(簡稱電信碼)屬內碼性質依據 78 年 4 月所公布之數據

通信中文電碼手冊中共收納 16384 個字分別編入第一二字面均由 0001 開始

以 16 進位編碼順序排列其編碼符合 ISO2022 及 ISO646 之標準規定

第一字面為原「電碼新編」前 7902 個字(0001~7902)加 41 個注音符號(含

四聲) (7903~7943)96 個全形 ASCII 字元(7944~8039) 1 個特殊指示符號

(8040) 5 個中文文書標點符號(8041~8045)剩餘 791 個空碼第二字面由電

信新編補遺續補遺部份教育部常用字續補次常用字電腦查號新增字財

稅用字等構成(0001~8489)另加兩位阿拉伯數字 00~99(8490~8589)剩餘 246

個空碼其空碼位置可依需要填入所需之自造字

4工商登記用字 (工商)

經濟部商業司[17]負責管理全國公司行號的工商登記用字其編碼系統以大

五碼為基礎並建置約五千餘個自造字

5地段名用字 (地政)

內政部地政司負責管理全國地址的登記用字其編碼系統亦以大五碼為基

礎每個不同的縣(市)皆依各自不同的需求建置屬於自己的自造字對照表因此

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 20: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

15

除了原有大五碼的 13053 個字為各縣(市)所共用外自造字對照表分別有台北

市台北縣台中市台中縣台南市台南縣台東縣宜蘭縣花蓮縣金

門縣南投縣屏東線苗栗縣桃園縣高雄市高雄縣基隆市連江縣

雲林縣新竹市新竹縣嘉義市嘉義縣彰化縣澎湖縣等 25 種

第四節 國家標準交換碼 (CNS 11643)

在中文內碼或中文作業系統中就現實環境而言一直存在著系統間中文資

訊無法直接交換的問題甚至在同樣的資訊環境內也會有因自造字而產生的同碼

異字的現象更加深數位資料交換處理上成本的虛耗因此解決中文資訊交換

所衍生出的中文交換碼國家標準交換碼 CNS 11643 已成為國內最大最完整

的字集進而成為國際表意文字編製內容的主要供應來源

CNS 11643 第一版在七十五年正式公佈實施共收錄了 13053 個中文字

分屬 12 兩個字面由於施行起來無法滿足各電腦化業務所需於是行政院主

計處電子處理資料中心開始彙整各機關自造字在八十一年由標準檢驗局公佈第

二版並更名為「中文標準交換碼」(Chinese Standard Interchange Code以下簡

稱為 CSIC)總共搜納 48027 字此外為使 CSIC 與 ISOIEC 10646 字集能同

步化的編制九十二年經濟部標準檢驗局再度著手擴編 CNS 11643第三版的編

碼字面數由第二版的 7 個字面擴編為 15 個字面中文字集也從原來的四萬八千

餘字增加到約九萬多字另為解決編碼字面容量飽和的問題CNS 11643 第三版

也將編碼空間由第一版原先所規定的 16 字面增加到 80 個字面以於九十六年公

告施行

CNS 11643 遵循 ISOIEC 2022 之規定採兩位元組編碼字元碼每一位元

組使用 0x21~0x7E 的 94 個編碼位置因此編碼空間為 94 個字列每字列 94

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 21: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

16

個字格(亦即碼位)每一字面總計 94times94 共 8836 個碼位CNS 11643-九十六

年版本增訂為 80 個字面共 706880 個碼位各字面安排如下[8]

第一字面0x2121~0x4243 為符號區0x4421~0x7D4B 編 5401 字字集來

源為教育部「常用國字標準字體表」4808 字國中國小教科書

中常用字 587 字及異體字 6 字

第二字面0x2121~0x7244編 7650 字字集來源為教育部「次常用國字

標準字體表」6330 字教育部「罕用國字標準字體表」1320 字

第三字面0x2121~0x6246編 6148 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分0x6448~0x672A

為個美國與香港提報 247 字

第四字面0x2121~0x6E5C編 7298 字字集來源為 77 年行政院主計處電

子處理資料中心暫編於第 14 字面使用加字部分 171 字戶役政

ISOIEC 10646-22001資訊業用字 7127 字

第五字面0x2121~0x7C51編 8603 字字集來源為教育部罕用字

第六字面0x2121~0x647A編 6388 字字集來源為筆畫 14 畫(含)以下之

教育部異體字

第七字面0x2121~0x6655編 6539 個字集來源為筆畫在 15 畫(含)以上

之教育部異體字

第八字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第九字面0x2121~0x2547編 1935 字字集來源為 ISOIEC 106462003 基

本多文種平面中非漢字

第十字面0x2121~0x7E7E編 8836 字字集來源為 ISOIEC 106462003

表意文字補充平面中漢字

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 22: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

17

第十一字面0x2121~0x733D編 7472 字0x2121~0x4840字集來源為

ISOIEC 106462003 表意文字補充平面中漢字0x4921~0x733D

為地政字國語會閩南語母語用字

第十二字面0x2121~0x7D77A編 5420 字字集來源為戶政字

第十三字面0x2121~0x7C7A編 5745 字字集來源為戶政字

第十四字面0x2121~0x7D58編 5478 字字集來源為戶政字外0x4B6D~0x

至 6D79 為 ISOIEC 106462003 中漢字

第十五字面0x2121~0x6D39h編 6831 字字集來源為戶役政作業第十五

字面

第十六字面私人造字區

第 17~第 80 字面保留供未來使用

第五節 WebServices

根據 W3C[5]對 Web Services 的定義Web Services 為透過 URI 方式存取的

軟體程式可以透過 XML 的定義描述或搜尋其介面與結合方式(binding)同

時也可以藉由以網網為基礎的通訊協定以 XML 訊息與其它軟體程式溝通

Web Services 是一種基於 SOAPWSDL 和 UDDI 所建立的服務導向網路服務機

制是種屬於 XML-Based 架構將企業在網路上所提供的服務以 WSDL 的標

準建構成 XML 文件註冊到 UDDI以達到集中管理網路上的各種服務和使用者

易於搜尋的目的其優點包括使用者可以在不同的平台以不同的程式語撰寫用

戶端程式來使用 Web ServicesWeb Services 以 HTTP POST 來傳送 SOAP 訊息

一般電腦並不會關閉 Port 80所以 SOAP 訊息不會被防火牆擋下來

Web Services 主要包括 WSDLSOAP 和 UDDI 三個元件分別說明如下

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 23: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

18

1WSDL(Web Service Description Language)

由 Microsoft 和 IBM 所提出的一個以 XML 為基礎的規範語言是一種使用

XML 語法來描述 WebService 的介面語言主要描述 Server 端提供哪些 Web

ServicesClient 與 Server 如何進行溝通(包括Protocol格式參數等)當 Service

Provider 想要對外公佈其所提供的 Web Services就必須撰寫 WSDL 服務描述檔

案並註冊到 UDDI Service RegistryWSDL 描述內容包括

描述 Service Provider 所提供的 Web Services operations

描述 Service Requester 如何和 Web Services 的 operations 溝通

2SOAP(Simple Object Access Protocol)

Web Services 中資料交換的傳輸協定以 XML 作為資料交換的傳輸格式在

網際網路中SOAP 可以直接使用標準的 HTTPSMTP TCP 等傳輸協定來傳

送訊息用戶端可以在 SOAP 訊息中指定 Web Services 的方法名稱及參數來呼叫

Web Services 的方法伺服器端則會將結果放置在 SOAP 訊息中回傳給用戶端

bull 優點可以直接穿透防火牆不受平台及程式與言的限制

bull 缺點增加 HTTP Port 的負擔可能會造成整體效能的降低

SOAP (Simple Object Access Protocol)是一個 XML-based 的 lightweight

protocol用來在非集中分散的環境交換資訊由以下組成

bull 一個描述 SOAP Message 的封套(Envelop)包含訊息本身定義誰應該處理

他和描述如何處理

bull 一個表達應用程式資料型態的 Encoding rule 的集合

bull 一個表達 Remote procedure call 和 response 的協定

其架構圖如下所示

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 24: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

19

圖 5SOAP 訊息架構

3UDDI (Universal Description Discovery and Integration)

在 2000 年 9 月由 IBMMicrosoft 和 Ariba 三大公司所提出來的一種 B2B 電

子商務的註冊機制標準定義企業間的資料交換格式UDDI 定義 Web Services

的註冊搜尋與發現以提供網路上 Web Services 的取用及分享其目標主要是

讓任何網路上的服務皆可即時的傳遞服務訊息和內容給所需要的使用者

bull 優點減少使用者在尋找服務上的困難

bull 缺點被動式的發現

UDDI(Univeral Description Discovery Integeration)提供註冊與搜尋 Web

Services 資訊的一個標準使用 SOAP 當作通訊標準UDDI registry 包含分類的

business information提供的服務通訊標準以及交易介面對於 Web Services

而言其技術規格就是 WSDL所以就是要查詢其 WSDL 的位址UDDI Server

提供下列兩類功能查詢服務(Inquery)及公佈服務(Publishing)UDDI 是一個最

標準的 Web Services 資訊取得方式其內含了該 Web Services 的服務內容(服務

名稱敘述細節及分類)及連結資訊(實作敘述服務存取 URL 及該服務的參

數)

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 25: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

20

本研究將以 WebServices 技術實作出中文轉碼系統以提供使用者上傳對照

表及進行字串及純文字檔的轉碼作業

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 26: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

21

第三章 研究方法與步驟

本研究的方法及步驟如下所示

1 建立完整的「通用編碼」對照表包括大五碼Unicode 等

2 收集並建立五大行政資訊系統的對照表包括戶政 EUC 碼財稅交換碼

稅務內碼工商碼電信碼地政

3 建置中文內碼對照表服務定義以 CNS 11643 碼為主軸對應到各種中文內

碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式(包括 XML

檔文字檔和 Binary 檔)並提供一般使用者或機關造字管理者上傳中文

內碼對照表的服務

4 建置字串編碼轉換服務主要是提供應用程式模組透過 WebServices 來呼叫

全字庫的字串編碼轉換服務本服務模組提供通用編碼政府機關(五大行

政資訊系統)共用字集機關個人自造字這三者之間的字串轉碼工作在

此模組中定義了 CNST 語言來處理 SOAP 訊息內的模組元件呼叫

5 建置純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過

WebServices 來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供通用

編碼政府機關(五大行政資訊系統)共用字集機關個人自造字這三者

之間的的純文字檔轉碼工作在此模組中定義了 CNSXT 語言來處理 SOAP

訊息內的模組元件呼叫

6 針對中文內碼對照表字串編碼轉換純文字檔編碼轉換三項服務本研

究提供了三種不同的介面以供使用者呼叫使用包括應用程式介面(API)

函式庫網頁以及使用者介面軟體(全字庫軟體包)

第一節 研究架構

檔轉換電子閘門為政府中文共通平台提供給各機關單位的應用系統做和

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 27: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

22

CNS 11643 碼中文字相關的各種服務本文件轉換電子閘門定義了字串編碼轉換

服務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字

處理有關的功能各機關的應用系統可以透過檔轉換電子閘門的服務來完成跨機

關檔的傳送或機關內部檔的使用

政府中文共通平台的檔轉換電子閘門提供各機關單位的應用系統在跨機關

文件交換或機關內部檔處理所需要的 CNS 11643 碼中文字相關服務政府中文

共通平台使用全字庫來儲存 CNS 11643 碼中文字的完整處理資訊包括 CNS

11643 碼中文字在字形注音字義部首等處理資訊以及 CNS 11643 碼對應到

BIG5EUCUTF-32 等中文內碼的對照表中文共通平台提供字串編碼轉換服

務純文字檔編碼轉換服務和中文內碼對照表服務等 CNS 11643 碼中文字處

理有關的功能

文件轉換電子閘門在字串編碼轉換服務中定義了 CNS 轉換語言 (CNS

Transform Language簡稱 CNST) 以提供應用系統在處理 CNS 11643 碼的字串

轉碼時透過 SOAP 訊息呼叫此服務在純文字檔編碼轉換服務中定義了 CNS 純

文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT) 以提供應用系統

在處理純文字檔轉碼時透過 SOAP 訊息呼叫此服務在中文內碼對照表服務中定

義了 CNS 映射語言 (簡稱 CNSMCNS Mapping Language)來規範中文內碼對照

表相關內容的 XML 格式以上三項服務可以提供中文共通平台完整的服務

為了提供應用系統在呼叫中文共通平台的服務時有所依循特別提供一組應

用程式介面(Application Program Interface簡稱 API)元件讓應用系統可以包含在

其程式模組中以建立和中文共通平台的文件轉換電子閘門之間的通道

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 28: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

23

圖 6文件轉換電子閘門系統架構圖

在中文共通平台的檔轉換電子閘門中包括三個模組元件

1 字串編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP 訊息來

呼叫全字庫的字串編碼轉換服務本服務模組提供的編碼轉換包括各種中文

內碼的編碼(包括 BIG5EUCUTF32)和 CNS 11643 的四種編碼格式(包括

HEX8B-CNSCNS-UTFBIN4)做字串轉碼工作在此模組中定義了 CNST

語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包括 CNS 轉

BIG5 元件(CNSTBIG5) BIG5 轉 CNS 元件(BIG5TCNS) CNS 轉 UTF16

元件(CNSTUTF16) UTF16 轉 CNS 元件(UTF16TCNS)CNS 轉 UTF32 元

CNST

CNSXT

CNSM

中文共通平台服務

中文共通平台服務

API

API

文件轉換電子閘門

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 29: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

24

件(CNSTUTF32) UTF32 轉 CNS 元件(UTF32TCNS) CNS 轉 EUC 元件

(CNSTEUC) EUC 轉 CNS 元件(EUCTCNS)等八個元件本服務模組的伺

服器端服務定義的 WSDL 格式詳見附錄的字串轉碼服務之 WSDL

2 純文字檔編碼轉換服務本服務模組主要是提供應用程式模組透過 SOAP

訊息來呼叫全字庫的純文字檔編碼轉換服務本服務模組提供的編碼轉換為

純文字檔做各種中文內碼(包括 BIG5EUCUTF32)和 CNS 11643 各種編

碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的轉碼工作在此模組中定

義了 CNSXT 語言來處理 SOAP 訊息內的模組元件呼叫本服務模組目前包

括 CNS 轉 BIG5 元件(CNSXBIG5) BIG5 轉 CNS 元件(BIG5XCNS) CNS

轉 UTF16 元件(CNSXUTF16) UTF16 轉 CNS 元件(UTF16XCNS)CNS

轉 UTF32 元件(CNSXUTF32) UTF32 轉 CNS 元件(UTF32XCNS) CNS

轉 EUC 元件(CNSXEUC) EUC 轉 CNS 元件(EUCXCNS)等八個元件本

服務模組的伺服器端服務定義的 WSDL 格式詳見附錄的純文字檔轉碼服務

之 WSDL

3 中文內碼對照表服務本服務模組主要是定義以 CNS 11643 碼為主軸對應

到各種中文內碼的中文內碼對照表的轉換規則和流程中文內碼對照表格式

(包括 XML 檔文字檔和 Binary 檔)和提供使用者上傳中文內碼對照表

的功能服務在此模組中定義了 CNSMM 語言來說明 CNS 11643 碼為主軸

對應到各種中文內碼的中文內碼對照表的轉換規則和流程並定義了 CNSM

語言來規範中文內碼對照表的 XML 檔格式本服務模組並提供使用者上傳

三種格式(包括 XML 檔文字檔和 Binary 檔)中文內碼對照表的使用者介

面的功能服務

在以上模組元件中字串編碼轉換服務純文字檔編碼轉換服務等兩項服務

都提供應用程式模組透過 SOAP 訊息來呼叫這些服務在建置這些服務系統時

可以參考國際的資訊網服務(Web Services)標準的技術架構(註稱為

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 30: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

25

Services-Oriented Architecture簡稱 SOA)包括 SOAPWSDLUDDI(Universal

Description Discovery and Integration)等標準的技術如下圖所示

圖 7資訊網服務系統建置圖

目前本檔轉換電子閘門系統的建置包括有 Web 伺服器SOAP 伺服器服

務元件(註結合 WSDL)全字庫功能元件和應用系統客戶端的實作(註應用

系統客戶端是指服務元件的客戶端其可以為應用系統伺服器的程式或應用系統

客戶端的程式)至於 UDDI 註冊伺服器(UDDI Registry)部份的建置尚未包括在

本研究的建置建議相關單位配合政府共通平台電子閘門的建置來加入 UDDI

註冊伺服器的服務建置

第二節 中文內碼對照表服務

CNS 映射語言是 XML 格式的中文內碼對照表描述以 CNS 11643 碼主軸的

各頁面碼字對應到各種中文內碼碼字的映射在中文內碼對照表中區分為通用對

照表和自造字對照表兩種

1TBL 對照表

Binary 格式對照表(副檔名為 tbl)此對照表以 CNS 11643 交換碼對應各種

UDDI Registry

Web 伺服器

WSDL

資訊網服務

客戶端

(應用系統) SOAP 伺服器

全字庫 資訊網服務

伺服器系統

SOAP SOAP over

HTTP

服務元件功能元件

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 31: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

26

內碼作為電子轉碼閘門轉換不同編碼之骨幹其格式如下表

表格 4字碼對照表 Binary 檔格式

MapTblHeader 128bytes

MapTblData 1 Variable

MapTblData 2 Variable

MapTblData N Variable

MapTblData Main missing character Variable (optional 註 1)

MapTblData Map missing character Variable (optional 註 1)

2TXT 對照表

文字檔格式對照表(副檔名為 txt)此對照表包含使用者定義之內碼對應

CNS 11643 交換碼之描述經由轉碼閘門 CNSM 對照表上傳模組轉換成為

TBL 格式對照表後用與其他對照表互通其格式如下表

表格 5字碼對照表文字檔檔案格式

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

通用對照表和自造字對照表所對應之編碼相同差別在於自造字集因不同單

位或使用者所造成的差異根據公文製作管理機關代碼 G2B2C 之規範各單位

可透過其所定義之機關代碼來描述其自造字集之對照表故電子閘門可以透過該

描述達到轉換不同機關編碼之目地

CNSM 自動備份機制通用或自造字對照表上傳要更新時Server 自動先將

原對照表(同檔名同機關代碼與流水號)備份備份格式為原主檔名_X 年 X

月 X 日 X 點 X 分 X 秒tbl

五大行政系統及新編螞五大行政包含地政公路監理稅務戶役政工

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 32: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

27

商等其中除戶役政使用 EUC 碼其於皆為 BIG5 內碼及 BIG5 造字區為了使

五大系統可以相互交流轉換各大系統必須整理其與 CNS 11643 之對照表除

此之外轉碼閘門提供各編碼之描述作為對照表上傳的基準

請參考下表之 XML Schema單一編碼以ltCodegt元件包覆其中之各項元件

用以描述其特徵包括ltCodeNamegt簡稱ltCodeRangegt碼位範圍ltCodeTypegt

ltCodeLengthgt馬位長度(Byte)ltDisplayNamegt顯示名稱ltDescriptiongt說明描

述當編碼管理者清楚定義各項屬性後轉碼對照表的製做上傳及實際轉碼流程

即可透過轉碼閘門順利達成

編碼描述之 XML Schema

ltxml version=10 encoding=big5 gt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeListgt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodegt

ltCodeNamegtBIG5ltCodeNamegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltCodeRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtC67EltUppergt

ltLowergtA447ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtF9FEltUppergt

ltLowergtC940ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA3FEltUppergt

ltLowergtA140ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 33: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

28

ltUppergtC8FEltUppergt

ltLowergtC6A1ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtFEFEltUppergt

ltLowergtFA40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergtA0FEltUppergt

ltLowergt8E40ltLowergt

ltRangegt

CProgram FilesApache Software FoundationTomcat

55webappsaxiscnsmcnsmRegistryxml - ltRangegt

ltUppergt8DFEltUppergt

ltLowergt8140ltLowergt

ltRangegt

ltCodeRangegt

ltCodeTypegt0x02ltCodeTypegt

ltCodeLengthgt2ltCodeLengthgt

ltDisplayNamegt大五碼ltDisplayNamegt

ltDescriptiongt中文大五碼ltDescriptiongt

ltCodegt

ltCodeListgt

第三節 字串編碼轉換服務

字串編碼轉換服務為政府中文共通平台提供給各機關單位的應用系統做字

串在各種中文內碼和 CNS 11643 碼之間的編碼轉換服務本服務使用 CNS 轉換

語言透過 SOAP 訊息的呼叫可將各種中文內碼的編碼(包括 BIG5EUCUTF32)

和 CNS 11643 的四種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)做字串轉

碼工作

各機關單位元的應用系統需要處理字串編碼轉換服務時可以使用 CNS 轉

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 34: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

29

換語言(簡稱 CNST)透過 SOAP 訊息來呼叫中文共通平台的字串編碼轉換服務

本服務會以 SOAP 回覆訊息傳回轉碼後字串字串編碼轉換服務系統架構圖如下

圖 8字串編碼轉換服務系統架構圖

字串編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32 等三

種碼之間做相互轉換本服務在 CNS-1164 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 轉換語言(CNS Transform Language簡稱 CNST)定義字串編碼轉換服

務提供的功能如後所示

CNS 碼Big5 碼 ltcnstCNSTBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlns=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnstCNSTBIG5gt

BIG5 碼CNS 碼 ltcnstBIG5TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnt=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnstBIG5TCNS gt

CNS 碼UTF16 碼 ltcnstCNSTUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF16 gt

使用 CNST 呼叫

字串轉碼服務 中文共通平台

字串轉碼服務

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 35: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

30

UTF16 碼CNS 碼 ltcnstUTF16TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF16TCNS gt

CNS 碼UTF32 碼 ltcnstCNSTUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnsxtstringgt ltcnst CNSTUTF32 gt

UTF32 碼CNS 碼 ltcnstUTF32TCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst UTF32TCNS gt

CNS 碼EUC 碼 ltcnstCNSTEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst CNSTEUC gt

EUC 碼CNS 碼 ltcnstEUCTCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnstxsdrdquogt ltcnststringgtxxxxxxxxlt cnststringgt ltcnst EUCTCNS gt

cnst 語言定義

CNS 轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資料型

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnstgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSTBIG5 type=cnsttypegt ltxselement name=BIG5TCNS type=cnsttypegt ltxselement name=CNSTUTF16 type=cnsttypegt ltxselement name=UTF16TCNS type=cnsttypegt

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 36: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

31

ltxselement name=CNSTUTF32 type=cnsttypegt ltxselement name=UTF32TCNS type=cnsttypegt ltxselement name=CNSTEUC type=cnsttypegt ltxselement name=EUCTCNS type=cnsttypegt ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsttypegt ltxssequencegt ltxselement name=string type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

第四節 純文字檔編碼轉換服務

跨機關處理純文字檔之編碼轉換為可使用政府中文共通平台的純文字檔編

碼轉換服務來做純文字檔之編碼轉換工作本服務使用 CNS 純文字檔轉換語

言透過 SOAP 訊息的呼叫可將純文字檔做各種中文內碼(包括 BIG5EUC

UTF32)和 CNS 11643 各種編碼格式(包括 HEX8B-CNSCNS-UTFBIN4)的

轉碼工作

各機關單位元的應用系統需要處理純文字檔之編碼轉換時可以使用 CNS

純文字檔轉換語言(簡稱 CNSXT)透過 SOAP 訊息以附件方式夾帶轉碼前純文字

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 37: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

32

檔來呼叫中文共通平台的純文字檔編碼轉換服務本服務的 SOAP 回覆訊息會以

附件方式夾帶轉碼後純文字檔純文字檔編碼轉換服務的系統架構圖如下圖

圖 9純文字檔編碼轉換服務的系統架構圖

純文字檔編碼轉換服務定義以 CNS 11643 碼為中心和 BIG5EUCUTF-32

等三種碼之間做相互轉換本服務在 CNS 11643 碼的部份提供 HEX8B-CNS

CNS-UTFBIN4 等四種編碼格式

CNS 純文字檔轉換語言(CNS Text Transform Language簡稱 CNSXT)定義純

文字檔編碼轉換服務提供的功能如後所示

CNS 碼Big5 碼 ltcnsxtCNSXBIG5 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXBIG5gt BIG5 碼CNS 碼 ltcnsxtBIG5XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtBIG5XCNSgt CNS 碼UTF16 碼 ltcnsxtCNSXUTF16 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF16gt UTF16 碼CNS 碼 ltcnsxtUTF16XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

純文字檔(轉碼應

使用 CNSXT 語言呼叫 中文共通平台

純文字檔編碼轉換服務

純文字檔(轉碼

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 38: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

33

ltcnsxtUTF16XCNSgt CNS 碼UTF32 碼 ltcnsxtCNSXUTF32 cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtCNSXUTF32gt UTF32 碼CNS 碼 ltcnsxtUTF32XCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtUTF32XCNSgt CNS 碼EUC 碼 ltcnsxtCNSXEUC cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt

ltcnsxtCNSXEUCgt

EUC 碼CNS 碼 ltcnsxtEUCXCNS cnsencoding= ldquoHEX8|CNS-UTF8|B-CNS|BIN4rdquo

xmlnscnst=ldquocnsxtxsdrdquogt ltcnsxtfilegtxxxxtxtlt cnsxtfilegt ltcnsxtEUCXCNSgt

cnsxt 語言定義

CNS 純文字檔轉換語言的語言定義是以 XML Schema 來規範語言內的結構和資

料型式

ltxml version=10 encoding=UTF-8gt ltxsschema xmlnsxs=httpwwww3org2001XMLSchema elementFormDefault=qualified attributeFormDefault=unqualifiedgt ltxselement name=cnsxtgt ltxscomplexTypegt ltxschoicegt ltxselement name=CNSXBIG5 type=cnsxttypegt ltxselement name=BIG5XCNS type=cnsxttypegt ltxselement name=CNSXUTF16 type=cnsxttypegt ltxselement name=UTF16XCNS type=cnsxttypegt ltxselement name=CNSXUTF32 type=cnsxttypegt ltxselement name=UTF32XCNS type=cnsxttypegt ltxselement name=CNSXEUC type=cnsxttypegt ltxselement name=EUCXCNS type=cnsxttypegt

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 39: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

34

ltxschoicegt ltxscomplexTypegt ltxselementgt ltxscomplexType name=cnsxttypegt ltxssequencegt ltxselement name=file type=xsstringgt ltxssequencegt ltxsattributeGroup ref=codeattrgt ltxscomplexTypegt ltxsattributeGroup name=codeattrgt ltxsattribute name=cnsencoding use=requiredgt ltxssimpleTypegt ltxsrestriction base=xsstringgt ltxsenumeration value=HEX8gt ltxsenumeration value=CNS-UTF8gt ltxsenumeration value=B-CNSgt ltxsenumeration value=BIN4gt ltxsrestrictiongt ltxssimpleTypegt ltxsattributegt ltxsattributeGroupgt ltxsschemagt

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 40: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

35

第四章 研究成果

在本章中我們將以所實作出來的網頁轉碼閘門系統成果為例介紹其功

能首先此轉碼閘門系統主要的目的是「提供所有使用者可以針對通用編碼

政府機關(五大行政資訊系統)共用字集及機關個人自造字這三類的字串或純文

字檔案進行轉碼作業」因此本系統必須提供對照表上傳機制以建置完整的對

照表再提供使用者字串或純文字檔案的轉碼功能但如果使用者所提供的不是

存文字檔案時我們亦可透過全字庫軟體包來下載並切換到該使用者的造字集檔

案在自己的電腦上使用該使用者的造字集便可正確無誤的瀏覽此文件以下

便依序介紹對照表上傳字串轉碼純文字檔案轉碼及使用他人造字集的功能

第一節 對照表上傳

有關對照表的部分在第一章的表 1 中曾提到我們將對照表分為三類其中

通用編碼和政府機關(五大行政資訊系統)共用字集乃是由系統管理者負責收集

整理並建立與維護這兩類對照表至於第三種「機關個人自造字」可分為機

關(含政府及公司行號)自造字及一般使用者的個人自造字兩種對照表前者由機

關自造字管理者所負責管理而後者則是由一般使用者所管理當機關造字管理

者或一般使用者想要上傳自己的對照表時須先經過註冊(如下圖)成為正式會員

後才能上傳對照表

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 41: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

36

圖 10使用者註冊

1機關造字管理者

機關自造字管理者須整理機關內所使用的自造字對照表除國標碼字面數為

10 進位外其餘欄位為 16 進位其格式如下表所示

表格 6機關自造字對照表之格式說明

國標碼字面數 空白 國標(CNS)碼 空白 對照內碼

2 位元組 1 位元組 4 位元組 1 位元組 4~8 位元組

接著登入系統後點選「機關對照表」「對照表上傳」機關造字管理者

可以選擇其下轄的單位再選擇自造字對照表的類型並選取所要上傳的對照表

檔案位置最後點選提交如下圖所示

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 42: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

37

圖 11機關造字管理者上傳對照表

另一方面同一機關裡可能會存在不同的單位或系統因此有可能需要不同

的自造字對照表所以本系統亦提供同一機關可以上傳不同對照表的功能首

先機關造字管理者登入系統後點選「機關對照表」「對照表描述設定」

再新增其所屬的單位或系統如下圖所示

1

2

3

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 43: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

38

圖 12機關造字管理者新增其所屬的單位或系統

2一般使用者

一般使用者可至全字庫網站中下載「全字庫軟體包」如下圖

圖 13全字庫軟體包下載頁面

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 44: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

39

下載並安裝完成全字庫軟體包之後使用者可以透過全字庫網站查詢中文字

碼在字碼查詢結果的頁面中會顯示此字碼的詳細資料若該字碼已存在

Windows XP 作業系統中其網頁下方會有相關提示訊息如下圖

圖 14字碼查詢結果頁面(系統已包含該字碼)

若該字碼不包含在 Windows XP 作業系統內時則會顯示一個超連結提供

使用者下載並轉入該字碼資料到電腦系統中如下圖所示

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 45: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

40

圖 15字碼查詢結果頁面(系統未包含該字碼)

當使用者將其所需的字碼透過全字庫軟體包下載到電腦系統中後系統會自

動建立自造字對照表使用者可於登入轉碼閘門系統後選擇「個人造字集」

「造字集上傳」再選擇適當的造字集目錄及造字集檔案檔案位置點選上傳即

可完成如下圖所示

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 46: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

41

圖 16使用者上傳造字集

使用者可透過「造字集查詢」功能查詢目前系統中所有使用者的造字集內

容包含造字集中的相關屬性及字型如下圖所示

圖 17造字集查詢頁面

1

2

3

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 47: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

42

第二節 字串轉碼

轉碼系統提供字串轉碼的功能使用可以透過此功能來進行字串的編碼轉

換其步驟如下所示

1首先使用者先於「轉碼字串」欄位中以英數型式輸入所要轉換的字串內碼

可輸入多個字字與字之間不須隔開

2再選擇「來源編碼」及「目的編碼」

3另外如果使用者想要轉碼的系統為個人或機關時可進一步選擇來源及目

的的機關及其下轄單位

4點選提交之後其轉碼結果會顯示在「轉碼結果」欄位如下圖

圖 18字串轉碼頁面

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 48: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

43

本系統的字串轉碼功能基本上使用者所輸入的「轉碼字串」或是系統所

輸出的「轉碼結果」皆是以英數型式顯示其內碼字串如上圖的「轉碼字串」以

字串型式輸入 EUC 碼除了「大五碼+CNS(標籤表示法)」可以直接輸入或輸出

Big5 中文字型外其餘皆以各編碼系統的內碼字串顯示可參考表格 4 之說明

表格 7字串轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 49: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

44

第三節 純文字檔轉碼

純文字檔轉碼功能基本上與字串大同小異主要的不同處在於字串轉碼其

輸入及輸出的格式大部分為字串格式的內碼型式(除了「大五碼+CNS(標籤表示

法)」之外)而純文字檔案轉碼的輸入及輸出則是除了「CNS(八個英數字表示

法) 」及「財稅交換碼」仍以字串格式呈現其餘皆以內碼作為其輸入及輸出

純文字檔轉碼的種類如下表所示

表格 8純文字檔轉碼的種類

編碼名稱 說明

大五碼 中文大五碼的內碼字串型式(如「字」則輸入或輸出其

大五碼的內碼字串「A672」)

UTF16 UTF16 編碼格式(如「字」則輸入或輸出其 UTF16 編

碼的內碼字串「5B57」)

CNS(八個英數字表

示法)

以 8 個位數的英數型式顯示其國標碼的格式(如

000B3B62表示 CNS 第 11 字面的 3B62)

大五碼+CNS(標籤

表示法)

屬於 BIG5 字集的部分會直接顯示其中文字型若不屬

於 BIG5 字集的部分則顯示其 CNS 國標碼的標籤格式

(如ltpagegt3ltpagegtltcodegt6246ltcodegt表示 CNS 第 3

字面的 6246)

CNS(Binary+Base64) 4 bytes binary code 國標碼格式(以 Base64 編碼)

僅適用於文件轉碼

CNS_UTF8 以 1-4 個 Byte 表示 CNS 11643 第一字面後的字元

(4 byte CNS 以 UTF-16 儲存後再轉 UTF-8 格式)

僅適用於文件轉碼

CNS(Binary 型式) 4 Bytes Binary Code 國標碼(僅適用於文件轉碼)

戶政 EUC EUC 編碼格式(如「字」則輸入或輸出其 EUC 碼

「8EA1C7F3」)

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 50: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

45

財稅交換碼 稅務機關通用交換碼的字串型式

稅務碼 稅務內碼的字串型式

工商碼 工商內碼的字串型式

電信碼 公路監理單位所使用的電信內碼的字串型式

例如當使用者取得一份使用 EUC 編碼的文件時直接開啟文件無法瀏覽

其內容會呈現亂碼狀態如下圖所示

圖 19開啟 EUC 編碼純文字檔案之畫面

使用者可以將此份文件利用本系統的純文字檔案轉碼功能轉換成適當的編

碼格式首先選擇文件的檔案位置來源檔案格式選擇「戶政 EUC」而目的檔

案格式則選擇「大五碼+CNS(標籤表示法)」(如下圖)

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 51: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

46

圖 20純文字檔案轉碼畫面

以將此份檔案轉成 Big5 編碼的文件至於那些不屬於 Big5 的字集將會以

CNS 標籤來呈現其轉碼後的文件如下圖

選擇 EUC 編碼

的檔案位置

選擇戶政 EUC

選擇大五碼

+CNS(標籤

表示法)

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 52: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

47

圖 21EUC 編碼文件的轉碼結果

另外假如有一位使用者(chou123)透過全字庫網站所提供的全字庫軟體包

將四個特殊的罕用字如下圖

圖 22使用者所轉入的四個罕用字

使用者(chou123)繕打一份文件檔如下圖

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 53: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

48

圖 23使用者所繕打的文件

當這份文件傳送給另一位使用者 Alice 時Alice 並無法正確的瀏覽文件的內

容其畫面如下圖所示

圖 24使用者 Alice 開啟文件的畫面

Alice 可以透過本系統所提供的純文字檔轉碼功能於來源檔案格式中選擇

「大五碼」並於來源機關中點選「選擇機關」搜尋到使用者 chou123 的帳號

最後目的檔案格式選擇使用「大五碼+CNS(標籤表示法)」如下圖

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 54: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

49

圖 25使用者文件的轉碼畫面

其轉碼之後的結果如下圖當 Alice 看到此結果文件之後即可知道使用者

chou123 在原始文件中使用了兩個罕用字分別是 CNS 第 3 字面的 6246 及第 10

字面的 2572

圖 26使用者文件的轉碼結果

選擇大五碼

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 55: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

50

全字庫軟體包提供另一功能Alice 可以直接下載使用者 chou123 的造字集

檔案在自己電腦系統內建立與使用者 chou123 相同的造字集環境此時Alice

所看到文件的內容會與使用者 chou123 完全一樣詳細內容描述於下一節

第四節 使用他人造字集

在一些情況下或許我們會希望建置與另一個人或系統相同的造字環境例

如機關內部的造字伺服器當在此台伺服器建置好造字檔之後機關內部的其

他人都使用與此伺服器相同的造字集讓每個使用者對於造字的內容有一遵循的

標準並便於統一集中控管全字庫軟體提供了這方面的功能其完整功能描述

如下

1造字轉入及列印功能將電腦無法打出來的字透過此工具轉入到電腦系統

中讓使用者可以輸入顯示及列印該字並提供以 PDF 方式列印出電腦系

統中所有轉入的造字資料讓使用者可以方便的查看

2字碼速查功能透過應用程式的使用者介面(UI)讓使用者可以快速地查詢

與下載全字庫提供的所有中文字(提供注音倉頡CNS 三種輸入法)

3造字集分享功能包括下列三項子功能

造字集上傳上傳使用者自己的造字集至全字庫伺服器(需帳號才可上傳)

造字集下載下載全字庫伺服器上其他使用者所提供的造字集至自己電腦

造字集切換切換自己電腦上的造字集

4字碼轉換功能針對不同編碼系統(Big5稅務碼財稅碼工商碼電信碼

CNSEUC 等)的文字或檔案進行轉換即前述的轉碼閘門

假如使用者 A 的造字集想分享給 B那麼可透過下表中的步驟讓 B 擁有與

A 相同的造字環境

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 56: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

51

表格 9造字集分享的步驟

角色 動作 可使用的介面

A 註冊 全字庫網站

A 上傳造字集 全字庫網站或全字庫軟體包

B 尋找所要的造字集 全字庫網站或全字庫軟體包

B 下載造字集 全字庫軟體包

B 切換造字集 全字庫軟體包

B 開始使用

讓我們以上一節最後所提到的案例來說明使用者 chou123 建置好自己的造

字環境並於全字庫網站註冊完成後上傳自己的造字檔案使用者 Alice 可開

啟全字庫軟體包造字集下載功能選擇所要下載的造字集檔案(chou123)如

下圖

圖 27造字集下載畫面

下載完成之後在點選造字集切換功能即看到剛所下載的造字集選擇之

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 57: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

52

後點選切換造字集(如下圖)並於系統重新登入或開機之後使用者 Alice 便擁

有與 chou123 相同的造字環境

圖 28造字集切換畫面

使用者 Alice 可以直接開啟 chou123 所撰寫的文件即可正確無誤的顯示文

件內容如下圖

圖 29瀏覽文件畫面

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 58: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

53

第五章 結論

資訊數位化的發展是現階段人類文明發揚的推手也是智慧進化的動力

文字演變的過程也述說著一代代對於傳統文化的那份堅持與理想當科技與文化

古今交會時雖有著交融時的衝突但更期待著是兩者的互利共生在漫漫歷史

的演進中從結繩到數位編碼對於文化生命的延續與民族圖騰的傳承觸動著

使命與挑戰的原始天性不論是Big5Unicode 或是CNS 11643等除保有在機

器瞬間的脈絡邏輯中更期待能烙印出深邃的文化內涵與傳承精神讓文字見證

著歷史的榮衰與成敗希望未來都是浪漫又美麗的榮耀

本研究主要針對國內因不同編碼系統所造成的文件交換困難之問題提出一

個方便且有效的解決方式我們以 CNS 11643 為其核心並以 WebServices 技術

實作出轉碼系統不僅提供基本的通用編碼及五大行政資訊系統編碼之間轉碼服

務亦提供機關單位的自造字管理者上傳機關內的自造字對照表讓機關內的文

件可以分享給外部單位同時也提供使用者造字處理工具(全字庫軟體包)以解

決使用者的造字問題同時使用者亦可上傳該軟體所自動產生的對照表檔案讓

各式各樣不同的中文編碼得以標準化而其所實作之系統能讓通用編碼五大行

政資訊系統各機關單位及一般使用者所使用的不同編碼撰寫之文件檔案得以

正確且方便的進行互轉作業

第一節 研究發現

1解決使用者造字問題

不同編碼系統所能容納的中文字數相當有限再加上中文字的數量隨時間的

演進不斷擴增造成編碼系統所內建的中文字已不敷使用且考量目前使用

者最常使用的作業系統 Windows XP全字庫網站提供了「全字庫軟體包」

以解決此方面的問題讓使用者可依自己的需求將所缺的中文字加入到編碼

系統中

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 59: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

54

2建立完整的對照表及其上傳機制

本研究建立完成通用編碼的對照表並收集國內五大行政資訊系統的對照表

資料一般個人用戶可以使用全字庫網站上所提供的全字庫軟體包利用其

字碼轉入的功能將全字庫網站上所提供的自造字快速的轉入到使用者的個

人電腦中該軟體會自動建立自造字對照表資料這三類的對照表將存放於

全字庫網站以便於集中控管且提供機關與個人有關自造字對照表上傳的功

能讓使用者可以將機關或個人所使用的自造字對照上傳至全字庫網站

3提供轉碼機制

轉碼系統包括三種操作介面應用程式介面函式庫網頁以及使用者介面軟

體(內含於「全字庫軟體包」中)提供給使用者多樣化的介面讓不同編碼

系統所產製的字串與純文字檔均可正確的進行互轉達到溝通無障礙的目

4創新的造字集分享機制

有別於其他的方式本研究提出一個創新的造字問題解決方式即使用者可

以下載他人的造字集至自己的電腦系統中爾後可將自己電腦系統切換成

其他使用者的造字環境那麼使用者就擁有和他人一樣的造字環境不再侷

限於某種形式的文件檔案亦不須再進行轉碼即可瀏覽對象的文件資料

及檔案等

第二節 研究建議

1建立離線轉碼系統

目前轉碼閘門系統係以網路的方式進行線上轉碼考量部分使用者無法長時

間使用網路或上網轉碼之速度緩慢等因素希望能利用離線方式進行轉碼

服務相信對使用者來說會有很大的幫助建議在未來開發相關系統時可考

慮增列此項功能使轉碼功能更為廣泛便利

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 60: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

55

2推廣至各機關單位使用

建議將本研究所開發之系統廣為推廣至各機關單位除了可協助其處理相關

造字與轉碼問題外亦能進一步要求各機關單位上傳其對照表讓本系統所

擁有的對照表資料更為完整

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 61: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

56

參考文獻

[1]ISO 網站httpwwwisoorg

[2]ISOIEC JTC1SC2WG2 - ISOIEC 10646ndashUCS 網站

httpanubisdkuugdkJTC1SC2WG2

[3]ISOIEC JTC1SC2WG2IRG 網站httpappsrvcsecuhkeduhk~irg

[4]Unicode 網站httpwwwunicodeorg

[5]W3C 網站httpwwww3org

[6]公路監理httpwwwthbgovtw

[7]內政部戶政司httpwwwrisgovtw

[8]行政院主計處電子處理資料中心全字庫網站httpwwwcns11643govtw

[9]行政院研究發展考核委員會httpwwwrdecgovtw

[10]何浩帆(1984)「IBM5550 Multiplan 使用手冊」道明發行

[11]邱菊梅(2002)「中文電腦缺字研究」玄奘人文社會學院 中國語文研究所碩

士論文

[12]財政部財稅資料中心httpwwwfdcgovtw

[13]財團法人中文數位化技術推廣基金會httpwwwcmexorgtw

[14]財團法人資訊工業策進會httpwwwiiiorgtw

[15]曾士熊(2004)「認識中文字元碼」

httpbetawslsinicaedutwbeartsncharcodescodeindexhtm

[16]經濟部標準檢驗局(CNS 11643中文標準交換碼)httpwwwbsmigovtw

[17]經濟部商業司httpgcisnatgovtw

[18]戴慧明(2004)「行政機關公文電子交換關鍵成功因素與效益之研究」銘傳

大學資訊管理學系碩士在職專班碩士論文pp 74-78

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 62: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

57

附錄

一字串轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNST_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNST_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNST_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=CheckCodeRangeRequestgt ltwsdlpart name=InCode type=xsdstringgt ltwsdlpart name=CodeType type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CheckCodeRangeResponsegt ltwsdlpart name=CheckCodeRangeReturn type=xsdbooleangt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Responsegt ltwsdlpart name=CNSTUTF32Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF32TCNSResponsegt ltwsdlpart name=UTF32TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCResponsegt ltwsdlpart name=CNSTEUCReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSResponsegt ltwsdlpart name=BIG5TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadRequestgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSResponsegt ltwsdlpart name=UTF16TCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=ReloadResponsegt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTBIG5Responsegt ltwsdlpart name=CNSTBIG5Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Responsegt ltwsdlpart name=CNSTUTF16Return type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=EUCTCNSResponsegt ltwsdlpart name=EUCTCNSReturn type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=BIG5TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=UTF16TCNSRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 63: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

58

ltwsdlmessagegt ltwsdlmessage name=CNSTUTF32Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTUTF16Requestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlmessage name=CNSTEUCRequestgt ltwsdlpart name=string type=xsdstringgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlmessagegt ltwsdlportType name=CNST_Servergt ltwsdloperation name=CheckCodeRange parameterOrder=InCode CodeTypegt ltwsdlinput message=implCheckCodeRangeRequest name=CheckCodeRangeRequestgt ltwsdloutput message=implCheckCodeRangeResponse name=CheckCodeRangeResponsegt ltwsdloperationgt ltwsdloperation name=CNSTBIG5 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTBIG5Request name=CNSTBIG5Requestgt ltwsdloutput message=implCNSTBIG5Response name=CNSTBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implBIG5TCNSRequest name=BIG5TCNSRequestgt ltwsdloutput message=implBIG5TCNSResponse name=BIG5TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF16 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF16Request name=CNSTUTF16Requestgt ltwsdloutput message=implCNSTUTF16Response name=CNSTUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF16TCNSRequest name=UTF16TCNSRequestgt ltwsdloutput message=implUTF16TCNSResponse name=UTF16TCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTUTF32 parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTUTF32Request name=CNSTUTF32Requestgt ltwsdloutput message=implCNSTUTF32Response name=CNSTUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32TCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implUTF32TCNSRequest name=UTF32TCNSRequestgt ltwsdloutput message=implUTF32TCNSResponse name=UTF32TCNSResponsegt ltwsdloperationgt ltwsdloperation name=EUCTCNS parameterOrder=string cnsencoding organgt ltwsdlinput message=implEUCTCNSRequest name=EUCTCNSRequestgt ltwsdloutput message=implEUCTCNSResponse name=EUCTCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSTEUC parameterOrder=string cnsencoding organgt ltwsdlinput message=implCNSTEUCRequest name=CNSTEUCRequestgt ltwsdloutput message=implCNSTEUCResponse name=CNSTEUCResponsegt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlinput message=implReloadRequest name=ReloadRequestgt ltwsdloutput message=implReloadResponse name=ReloadResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNST_ServerSoapBinding type=implCNST_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CheckCodeRangegt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CheckCodeRangeRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CheckCodeRangeResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 64: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

59

use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=BIG5TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSTUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32TCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32TCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32TCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCTCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCTCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCTCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSTEUCgt ltwsdlsoapoperation soapAction=gt

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 65: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

60

ltwsdlinput name=CNSTEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSTEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=Reloadgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=ReloadRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnst use=encodedgt ltwsdlinputgt ltwsdloutput name=ReloadResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNST_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNST_ServerServicegt ltwsdlport binding=implCNST_ServerSoapBinding name=CNST_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNST_Servergt ltwsdlportgt ltwsdlservicegt ltwsdldefinitionsgt

二純文字檔轉碼服務之 WSDL 定義

ltxml version=10 encoding=UTF-8gt ltwsdldefinitions targetNamespace=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlns=httpschemasxmlsoaporgwsdl xmlnsapachesoap=httpxmlapacheorgxml-soap xmlnsimpl=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnsintf=httpwwwcns11643govtwaxisservicesCNSXT_Server xmlnssoapenc=httpschemasxmlsoaporgsoapencoding xmlnswsdl=httpschemasxmlsoaporgwsdl xmlnswsdlsoap=httpschemasxmlsoaporgwsdlsoap xmlnsxsd=httpwwww3org2001XMLSchemagt ltwsdlmessage name=EUCXCNSResponsegt ltwsdlpart name=EUCXCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSResponsegt ltwsdlpart name=UTF16XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSResponsegt ltwsdlpart name=BIG5XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSResponsegt ltwsdlpart name=UTF32XCNSReturn type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF16XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=EUCXCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXEUCResponsegt ltwsdlpart name=CNSXEUCReturn type=apachesoapDataHandlergt ltwsdlmessagegt

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 66: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

61

ltwsdlmessage name=CNSXEUCRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=UTF32XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Responsegt ltwsdlpart name=CNSXUTF16Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF32Responsegt ltwsdlpart name=CNSXUTF32Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=BIG5XCNSRequestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXUTF16Requestgt ltwsdlpart name=cnsencoding type=xsdstringgt ltwsdlpart name=organ type=xsdstringgt ltwsdlpart name=AttachFile type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlmessage name=CNSXBIG5Responsegt ltwsdlpart name=CNSXBIG5Return type=apachesoapDataHandlergt ltwsdlmessagegt ltwsdlportType name=CNSXT_Servergt ltwsdloperation name=CNSXBIG5 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXBIG5Request name=CNSXBIG5Requestgt ltwsdloutput message=implCNSXBIG5Response name=CNSXBIG5Responsegt ltwsdloperationgt ltwsdloperation name=BIG5XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implBIG5XCNSRequest name=BIG5XCNSRequestgt ltwsdloutput message=implBIG5XCNSResponse name=BIG5XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF16 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF16Request name=CNSXUTF16Requestgt ltwsdloutput message=implCNSXUTF16Response name=CNSXUTF16Responsegt ltwsdloperationgt ltwsdloperation name=UTF16XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF16XCNSRequest name=UTF16XCNSRequestgt ltwsdloutput message=implUTF16XCNSResponse name=UTF16XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXUTF32 parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXUTF32Request name=CNSXUTF32Requestgt ltwsdloutput message=implCNSXUTF32Response name=CNSXUTF32Responsegt ltwsdloperationgt ltwsdloperation name=UTF32XCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implUTF32XCNSRequest name=UTF32XCNSRequestgt ltwsdloutput message=implUTF32XCNSResponse name=UTF32XCNSResponsegt ltwsdloperationgt ltwsdloperation name=CNSXEUC parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implCNSXEUCRequest name=CNSXEUCRequestgt ltwsdloutput message=implCNSXEUCResponse name=CNSXEUCResponsegt ltwsdloperationgt ltwsdloperation name=EUCXCNS parameterOrder=cnsencoding organ AttachFilegt ltwsdlinput message=implEUCXCNSRequest name=EUCXCNSRequestgt ltwsdloutput message=implEUCXCNSResponse name=EUCXCNSResponsegt ltwsdloperationgt ltwsdlportTypegt ltwsdlbinding name=CNSXT_ServerSoapBinding type=implCNSXT_Servergt ltwsdlsoapbinding style=rpc transport=httpschemasxmlsoaporgsoaphttpgt ltwsdloperation name=CNSXBIG5gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXBIG5Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXBIG5Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 67: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

62

ltwsdloperationgt ltwsdloperation name=BIG5XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=BIG5XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=BIG5XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF16gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF16Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF16Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF16XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF16XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF16XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXUTF32gt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXUTF32Requestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXUTF32Responsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=UTF32XCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=UTF32XCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=UTF32XCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=CNSXEUCgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=CNSXEUCRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=CNSXEUCResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdloperation name=EUCXCNSgt ltwsdlsoapoperation soapAction=gt ltwsdlinput name=EUCXCNSRequestgt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding namespace=httpcnsxt use=encodedgt ltwsdlinputgt ltwsdloutput name=EUCXCNSResponsegt ltwsdlsoapbody encodingStyle=httpschemasxmlsoaporgsoapencoding

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt

Page 68: 行政院主計處研究報告 中文字碼標準化及互轉機制之探討 · 元(Bit)表示一個字,共可組成128 個字,對拼音的英語系統,全部的英文字母、

63

namespace=httpwwwcns11643govtwaxisservicesCNSXT_Server use=encodedgt ltwsdloutputgt ltwsdloperationgt ltwsdlbindinggt ltwsdlservice name=CNSXT_ServerServicegt ltwsdlport binding=implCNSXT_ServerSoapBinding name=CNSXT_Servergt ltwsdlsoapaddress location=httpwwwcns11643govtwaxisservicesCNSXT_Servergt ltwsdlportgt ltwsdlservicegt

ltwsdldefinitionsgt