Codepages
Ianus implements a pluggable codepage mechanism. It has wide set of built-in codepages, that can be extended or overridden using the pluggable codepages registration process.
Built-in Codepages
Ianus supports the following code pages for EBCDIC to ASCII conversion:
BE500
CZ2975
DE273
DENNO277
ENUS037
(default)ES284
FISW278
FR297
IBM1047
IBM424
IBM850
IBM930
IBM939
ICE871
IT280
KR933
UK285
USCA37
Pluggable codepages
Ianus allows to plug-in custom codepages to extend or replace the built-in ones. Pluggable codepages are plain text files containing:
- SBCS EBCDIC to ASCII conversion table (mandatory)
- DBCS EBCDIC to ASCII conversion table (optional, only for DBCS codepages)
The folder codepages
in the Ianus installation directory, contains a number of pluggable codepage files, including:
- All the built-in codepages listed above
- DBCS codepages
Note
To customize a codepage, user can copy one of the pluggable codepage, customize it and then reference it in the Ianus environment file.
Plugin Registration
To add or replace codepage, the a Register Element must be specified in the Codepages Element, indicating:
- Name of the codepage, as referenced in the Repository Element or in the Field Element
- Full path of the codepage file
Structure of codepage files
Codepage files are structured as follows:
- Line starting by “#” or “*” are considered as comment
- Blank lines are ignored
- The SBCS conversion table, a 16 x 16 table of ASCII characters or HEX values (2 or 4 hex digit), representing the ASCII values for the EBCDIC value at a specified position
- For DBCS only codepages, the DBCS conversion table can be either:
- a N x 16 table of 4 hexadecimal digits representing the ASCII DBCS couple of bytes values for the EBCDIC bytes at a specified position, or
- a list of 4 hexadecimal digits value pairs representing the EBCDIC vs ASCII DBCS values
The format of the DBCS table must be indicated in the codepage registration.
Example 1 - DBCS table as matrix
* Host Code Page 931 Japanese Latin-Kanji *
* (037 + 300) *
* This is IBM EBCDIC codepage 037
*
* SBCS conversion table
* =====================
* 0 1 2 3 4 5 6 7 8 9 A B C D E F
00: 00 01 02 03 9c 09 86 7f 97 8d 8e 0b 0c 0d 0e 0f
10: 10 11 12 13 9d 85 08 87 18 19 92 8f 1c 1d 1e 1f
20: 80 81 82 83 84 0a 17 1b 88 89 8a 8b 8c 05 06 07
30: 90 91 16 93 94 95 96 04 98 99 9a 9b 14 15 9e 1a
40: 20 a0 â ä à á ã å ç ñ ¢ . < ( + |
50: & é ê ë è í î ï ì ß ! $ * ) ; ¬
60: - / Â Ä À Á Ã Å Ç Ñ ¦ , % _ > ?
70: ø É Ê Ë È Í Î Ï Ì ` : # @ ' = "
80: Ø a b c d e f g h i « » ð ý þ ±
90: ° j k l m n o p q r ª º æ ¸ Æ ¤
A0: µ ~ s t u v w x y z ¡ ¿ Ð Ý Þ ®
B0: ^ £ ¥ · © § ¶ ¼ ½ ¾ [ ] ¯ ¨ ´ ×
C0: { A B C D E F G H I ad ô ö ò ó õ
D0: } J K L M N O P Q R ¹ û ü ù ú ÿ
E0: \ ÷ S T U V W X Y Z ² Ô Ö Ò Ó Õ
F0: 0 1 2 3 4 5 6 7 8 9 ³ Û Ü Ù Ú 9f
*
* This is IBM EBCDIC codepage 300
*
* DBCS conversion table
* =====================
* 0 1 2 3 4 5 6 7 8 9 A B C D E F
4040: 8140 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
4140: 0000 83BF 83C0 83C1 83C2 83C3 83C4 83C5 83C6 83C7 83C8 83C9 83CA 83CB 83CC 83CD
4150: 83CE 83CF 83D0 83D1 83D2 83D3 83D4 83D5 83D6 0000 0000 0000 0000 0000 0000 0000
4160: 0000 839F 83A0 83A1 83A2 83A3 83A4 83A5 83A6 83A7 83A8 83A9 83AA 83AB 83AC 83AD
4170: 83AE 83AF 83B0 83B1 83B2 83B3 83B4 83B5 83B6 0000 0000 0000 0000 0000 0000 0000
...
Example 2 - DBCS as value pairs
* Host Code Page 937 Traditional Chinese *
* (037 + 835) *
* This is IBM EBCDIC codepage 037
* 0 1 2 3 4 5 6 7 8 9 A B C D E F
0000: 0000 0001 0002 0003 009C 0009 0086 007F 0097 008D 008E 000B 000C 000D 000E 000F
0010: 0010 0011 0012 0013 009D 0085 0008 0087 0018 0019 0092 008F 001C 001D 001E 001F
0020: 0080 0081 0082 0083 0084 000A 0017 001B 0088 0089 008A 008B 008C 0005 0006 0007
0030: 0090 0091 0016 0093 0094 0095 0096 0004 0098 0099 009A 009B 0014 0015 009E 001A
0040: 0020 00A0 00E2 00E4 00E0 00E1 00E3 00E5 00E7 00F1 00A2 002E 003C 0028 002B 007C
0050: 0026 00E8 00EA 00EB 00E8 00ED 00EE 00EF 00EC 00DF 0021 0024 002A 0029 003B 00AC
0060: 002D 002F 00C2 00C4 00C0 00C1 00C3 00C5 00C7 00D1 00A6 002C 0025 005F 003E 003F
0070: 00F8 00C9 00CA 00CB 00C8 00CD 00CE 00CF 00CC 0060 003A 0023 0040 0027 003D 0022
0080: 00D8 0061 0062 0063 0064 0065 0066 0067 0068 0069 00AB 00BB 00F0 00FD 00FE 00B1
0090: 00B0 006A 006B 006C 006D 006E 006F 0070 0071 0072 00AA 00BA 00E6 00B8 00C6 00A4
00A0: 00B5 007E 0073 0074 0075 0076 0077 0078 0079 007A 00A1 00BF 00D0 00DD 00DE 00AE
00B0: 005E 00A3 00A5 00B7 00A9 00A7 00B6 00BC 00BD 00BE 005B 005D 00AF 00A8 00B4 00D7
00C0: 007B 0041 0042 0043 0044 0045 0046 0047 0048 0049 00AD 00F4 00F6 00F2 00F3 00F5
00D0: 007D 004A 004B 004C 004D 004E 004F 0050 0051 0052 00B9 00FB 00FC 00F9 00FA 00FF
00E0: 005C 00F7 0053 0054 0055 0056 0057 0058 0059 005A 00B2 00D4 00D6 00D2 00D3 00D5
00F0: 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 00B3 00DB 00DC 00D9 00DA 009F
* This is IBM EBCDIC codepage 835
* DBCS conversion values
* =====================
* EBCDIC Big5Code
4040 A140
426B A141
4344 A142
4341 A143
424B A144
4345 A145
425E A146
427A A147
426F A148
425A A149
4741 A14A
447F A14B
447E A14C
4742 A14D
4743 A14E
4744 A14F
46E5 A150
4745 A151
4746 A152
4747 A153
4748 A154
46A7 A155
444A A156
4749 A157
...