summaryrefslogtreecommitdiff
path: root/enc/trans/big5.trans
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 09:35:08 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 09:35:08 +0000
commit60dfa6b655239a176c4fef4067c409c8b3f86e5d (patch)
treedcda60fd5d87756e42c6b454d71824b9c4b3699c /enc/trans/big5.trans
parent6ade3a42918e94be1c6d4b1bd9273ec1e3265525 (diff)
* enc/big5.c: split CP950 from Big5.
* enc/big5.c: split CP951 from Big5-HKSCS. * enc/trans/big5.trans: import conversion table of Big5, Big5-HKSCS, CP950, and CP951 from ICU. they need fallback conversions. ref [ruby-core:33256] http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/ * tool/transcode-tblgen.rb (import_ucm): add to import ucm files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/trans/big5.trans')
-rw-r--r--enc/trans/big5.trans20
1 files changed, 14 insertions, 6 deletions
diff --git a/enc/trans/big5.trans b/enc/trans/big5.trans
index fa96746..8a2717c 100644
--- a/enc/trans/big5.trans
+++ b/enc/trans/big5.trans
@@ -1,15 +1,23 @@
#include "transcode_data.h"
<%
- require "big5-tbl"
- require "big5-hkscs-tbl"
require "big5-uao-tbl"
- transcode_tblgen "Big5", "UTF-8", [["{00-7f}", :nomap], *BIG5_TO_UCS_TBL]
- transcode_tblgen "UTF-8", "Big5", [["{00-7f}", :nomap], *BIG5_TO_UCS_TBL.map {|a,b| [b,a] }]
+ tbls = import_ucm("glibc-BIG5-2.3.3.ucm")
+ transcode_tblgen "Big5", "UTF-8", [["{00-7f}", :nomap]] + tbls[0]
+ transcode_tblgen "UTF-8", "Big5", [["{00-7f}", :nomap]] + tbls[1]
- transcode_tblgen "Big5-HKSCS", "UTF-8", [["{00-7f}", :nomap], *BIG5_HKSCS_TO_UCS_TBL], ValidEncoding('Big5')
- transcode_tblgen "UTF-8", "Big5-HKSCS", [["{00-7f}", :nomap], *BIG5_HKSCS_TO_UCS_TBL.map {|a,b| [b,a] }]
+ tbls = import_ucm("windows-950-2000.ucm")
+ transcode_tblgen "CP950", "UTF-8", [["{00-7f}", :nomap]] + tbls[0], ValidEncoding('Big5')
+ transcode_tblgen "UTF-8", "CP950", [["{00-7f}", :nomap]] + tbls[1]
+
+ tbls = import_ucm("glibc-BIG5HKSCS-2.3.3.ucm")
+ transcode_tblgen "Big5-HKSCS", "UTF-8", [["{00-7f}", :nomap]] + tbls[0], ValidEncoding('Big5')
+ transcode_tblgen "UTF-8", "Big5-HKSCS", [["{00-7f}", :nomap]] + tbls[1]
+
+ tbls = import_ucm("windows-950_hkscs-2001.ucm")
+ transcode_tblgen "CP951", "UTF-8", [["{00-7f}", :nomap]] + tbls[0], ValidEncoding('Big5')
+ transcode_tblgen "UTF-8", "CP951", [["{00-7f}", :nomap]] + tbls[1]
transcode_tblgen "Big5-UAO", "UTF-8", [["{00-7f}", :nomap], *BIG5_UAO_TO_UCS_TBL], ValidEncoding('Big5')
transcode_tblgen "UTF-8", "Big5-UAO", [["{00-7f}", :nomap], *BIG5_UAO_TO_UCS_TBL.map {|a,b| [b,a] }]