File: big5.trans

package info (click to toggle)
ruby3.3 3.3.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 153,620 kB
  • sloc: ruby: 1,244,308; ansic: 836,474; yacc: 28,074; pascal: 6,748; sh: 3,913; python: 1,719; cpp: 1,158; makefile: 742; asm: 712; javascript: 394; lisp: 97; perl: 62; awk: 36; sed: 23; xml: 4
file content (32 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "transcode_data.h"

<%
  require "big5-hkscs-tbl"
  require "big5-uao-tbl"

  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]

  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]

  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], *UCS_TO_BIG5_HKSCS_TBL]

  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] }]

%>

<%= transcode_generated_code %>

TRANS_INIT(big5)
{
<%= transcode_register_code %>
}