### Code Set Converters Supplied

IBM C and C++ Compilers includes several converters that convert code sets to and from Unicode. Because the source or target of the conversion is Unicode, you can convert from virtually any code set to any other code set.

The code set converters supplied by IBM C and C++ Compilers are provided either as tables built by the ICONVDEF utility, or as functions inside CPPRUT36.DLL. The code set converters use the "Enforced subset match" method for characters that are in the input code set but are not in the output code set. All characters not in the output code set are replaced by the SUB character, which is

- 3F on the HOST
- 1A on ISO-8 and Windows
- 7F on a PC

The tables below show the code set converters supplied with IBM C and C++ Compilers. These are the conversions which make sense. The same characters are supported in all the code pages in a particular table, so converting text from one code page to another can be done without loss.

Arabic:

Host | PC | ISO 8 | Windows
IBM-420 IBM-8612 | IBM-4960 IBM-864 IBM-9056 | IBM-1008 IBM-1089 | IBM-1256 IBM-1046 IBM-5142

IBM-420 | EBCDIC, SB
IBM-8612 | EBCDIC, SB, base shapes only
IBM-4960 | IBM-PC Data, SB
IBM-864 | IBM-PC Data, SB
IBM-9056 | IBM-PC Data, SB, Storage/Interchange
IBM-1008 | ISO 8, SB
IBM-1089 | ISO 8, SB, ISO 8859-6
IBM-1256 | ISO 8, SB, with possible graphics in C1 area, Windows
IBM-1046 | ISO 8, SB, with possible graphics in C1 area, Windows
IBM-5142 | ISO 8, SB, with possible graphics in C1 area, Windows base shapes only

Baltic Rim:

Host | PC | ISO 8 | Windows
IBM-1112 |  | IBM-921 | IBM-1257

IBM-1112 | EBCDIC, SB
IBM-921 | ISO 8, SB
IBM-1257 | ISO 8, SB, with possible graphics in C1 area, MS Windows

Estonian:

Host | PC | ISO 8 | Windows
IBM-1122 |  | IBM-922 |

IBM-1122 | EBCDIC, SB
IBM-922 | ISO 8, SB

Greek:

Host | PC | ISO 8 | Windows
IBM-875 IBM-423 | IBM-851 IBM-869 | IBM-813 | IBM-1253

IBM-875 | EBCDIC, SB
IBM-423 | EBCDIC, SB
IBM-851 | IBM-PC Data, SB
IBM-869 | IBM-PC Data, SB
IBM-813 | ISO 8, SB, ISO 8859-7 Greek/Latin
IBM-1253 | ISO 8, SB, with possible graphics in C1 area, MS Windows

Israel (Hebrew):

Host | PC | ISO 8 | Windows
IBM-424 | IBM-856 IBM-862 IBM-4952 | IBM-916 | IBM-1255

IBM-424 | EBCDIC, SB
IBM-856 | IBM-PC Data, SB
IBM-862 | IBM-PC Data, SB, migration
IBM-4952 | IBM-PC Data, SB
IBM-916 | ISO 8, SB, ISO 8859-8 Hebrew
IBM-1255 | ISO 8, SB, with possible graphics in C1 area, MS Windows

Urdu:

Host | PC | ISO 8 | Windows
IBM-918 | IBM-868 | IBM-1006 |

IBM-918 | EBCDIC, SB
IBM-868 | IBM-PC Data, SB
IBM-1006 | ISO 8, SB

Latin-1 countries:

Host | PC | ISO 8 | ISO 7 | Windows
IBM-500 IBM-037 IBM-273 IBM-277 IBM-278 IBM-280 IBM-284 IBM-285 IBM-297 IBM-871 | IBM-850 IBM-437 IBM-860 IBM-861 IBM-863 IBM-865 | IBM-819 | IBM-1010 IBM-1011 IBM-1012 IBM-1013 IBM-1014 IBM-1015 IBM-1016 IBM-1017 IBM-1018 IBM-1019 | IBM-1252

IBM-500 | EBCDIC, SB, CECP: Belgium, Canada, Switzerland, Latin-1
IBM-037 | EBCDIC, SB, CECP: USA, Canada, Netherlands
IBM-273 | EBCDIC, SB, CECP: Austria, Germany
IBM-277 | EBCDIC, SB, CECP: Denmark, Norway
IBM-278 | EBCDIC, SB, CECP: Finland, Sweden
IBM-280 | EBCDIC, SB, CECP: Italy
IBM-284 | EBCDIC, SB, CECP: Spain, Latin America (Spanish)
IBM-285 | EBCDIC, SB, CECP: UK
IBM-297 | EBCDIC, SB, CECP: France
IBM-871 | EBCDIC, SB, CECP: Iceland
IBM-850 | IBM-PC Data, SB, MLP 222, Latin-1 countries
IBM-437 | IBM-PC Data, SB, PC base, USA and many others
IBM-860 | IBM-PC Data, SB, Portugal
IBM-861 | IBM-PC Data, SB, Iceland
IBM-863 | IBM-PC Data, SB, Canada (French)
IBM-865 | IBM-PC Data, SB, Denmark, Norway
IBM-819 | ISO 8, SB, CECP: ISO 8859-1 Latin-1
IBM-1010 | ISO 7, SB, France
IBM-1011 | ISO 7, SB, Germany
IBM-1012 | ISO 7, SB, Italy
IBM-1013 | ISO 7, SB, UK
IBM-1014 | ISO 7, SB, Spain
IBM-1015 | ISO 7, SB, Portugal
IBM-1016 | ISO 7, SB, Norway
IBM-1017 | ISO 7, SB, Denmark
IBM-1018 | ISO 7, SB, Finland, Sweden
IBM-1019 | ISO 7, SB, Belgium, Netherlands
IBM-1252 | ISO 8, SB, with possible graphics in C1 area, MS Windows Latin-1

Others (not in the table):

IBM-256 | EBCDIC, SB, Netherlands
IBM-282 | EBCDIC, SB, CEPG: Portugal (superseded by 037)
IBM-293 | EBCDIC, SB, APL (USA)
IBM-259 | EBCDIC, SB, Symbols, Set 7
IBM-1047 | EBCDIC, SB, Open Systems
IBM-1004 | IBM-PC Data, SB, extended DTP/Windows
IBM-1009 | ISO 7, SB, ISO-7; IRV (prior 1992)
IBM 367 | ISO 7, SB, ANSI X3.4 ASCII Standard; USA
IBM-1051 | ISO 8, SB, HP emulation (for use with Latin-1)
IBM-1275 | ISO 8, SB, with possible graphics in C1 area, Apple Latin-1
IBM-1276 | ISO 8, SB, Adobe PS standard encoding
IBM-1277 | ISO 8, SB, with possible graphics in C1 area, Adobe PS Latin-1

Latin-2 countries:

Host | PC | ISO 8 | Windows
IBM-870 | IBM-4948 IBM-852 |  | IBM-1250

IBM-870 | EBCDIC, SB, Eastern Europe Latin-2
IBM-4948 | IBM-PC Data, SB, Eastern Europe Latin-2
IBM-852 | IBM-PC Data, SB, Latin-2 Multilingual
IBM-1250 | ISO 8, SB, with possible graphics in C1 area, MS Windows

Cyrillic:

Host | PC | ISO 8 | Windows
IBM-1025 IBM-1123 IBM-880 | IBM-4951 IBM-855 IBM-866 | IBM-1124 IBM-915 | IBM-1251

IBM-1025 | EBCDIC, SB, Cyrillic Multilingual
IBM-1123 | EBCDIC, SB, Cyrillic Ukraine
IBM-880 | EBCDIC, SB, Cyrillic Multilingual
IBM-4951 | IBM-PC Data, SB, Eastern Europe Cyrillic
IBM-855 | IBM-PC Data, SB, Cyrillic
IBM-866 | IBM-PC Data, SB, Cyrillic Russian
IBM-1124 | ISO 8, SB, Cyrillic Ukraine
IBM-915 | ISO 8, SB, ISO 8859-5 Cyrillic
IBM-1251 | ISO 8, SB, with possible graphics in C1 area, MS Windows - Cyrillic

Turkey:

Host | PC | ISO 8 | Windows
IBM-1026 IBM-905 | IBM-857 | IBM-920 | IBM-1254

IBM-1026 | EBCDIC, SB, Latin-5
IBM-905 | EBCDIC, SB, Latin-3 Multingual (replaced by Latin-5)
IBM-857 | IBM-PC Data, SB
IBM-920 | ISO 8, SB, ISO 8859-9 Latin-5
IBM-1254 | ISO 8, SB, with possible graphics in C1 area, MS Windows

Thai:

Host | PC | ISO 8 | Windows
IBM-9030 IBM-838 | IBM-9066 IBM-874 |  |

IBM-9030 | EBCDIC, SB, Extended SBCS
IBM-838 | EBCDIC, SB, Extended SBCS
IBM-9066 | IBM-PC Data, SB, Extended SBCS
IBM-874 | IBM-PC Data, SB, Extended SBCS

Farsi:

Host | PC | ISO 8 | Windows
IBM-1097 | IBM-1098 |  |

IBM-1097 | EBCDIC, SB
IBM-1098 | IBM-PC Data, SB

Japanese SBCS <-> SBCS

| 290 | 1027
--- | --- | ---
00290 | N/A | Y
01027 | Y | N/A

IBM-1027 | EBCDIC, SB, Japanese Latin Host Extended SBCS
IBM-290 | EBCDIC, SB, Japanese Katakana Host Extended SBCS

Japanese MBCS <-> MBCS

| 932 | 942 | 943 | 930 | 939 | 33722
--- | --- | --- | --- | --- | --- | ---
00932 | N/A | N/A | Y | Y | Y | Y
00942 | N/A | N/A | Y | Y | Y | Y
00943 | Y | Y | N/A | Y | Y | Y
05026 | Y | Y | Y | N/A | Y | Y
05035 | Y | Y | Y | Y | N/A | Y
33722 | Y | Y | Y | Y | Y | N/A

IBM-930 | EBCDIC, MB, locking shifts, Japanese Katakana-Kanji, Extended SBCS
IBM-939 | EBCDIC, MB, locking shifts, Japanese Latin-Kanji, Extended SBCS
IBM-942 | IBM-PC Data, MB, Japanese PC Data Mixed, including 1880 UDC, Extended SBCS
IBM-943 | IBM-PC Data, MB, Japanese PC Data Mixed for Open Environment
IBM33722 | ISO 8, 2022 scheme, IBM EUC, IBMeucJP

Note:

- Code page 932 is a subset of code page 942. The conversion table for code page 942 will be used to convert to and from code page 932.
- Windows code page 932 is equivalent to IBM's code page 943. The conversion table for code page 943 will be used to convert to and from code page 932.

Others (not in the table):

IBM-1041 | IBM-PC Data, SB, Extended SBCS
IBM-301 | IBM-PC Data, DB, including 1880 UDC
IBM-897 | IBM-PC Data, SB
IBM-941 | IBM-PC Data, DB, for Open Environment
IBM-9145 | ISO 7, DB, Japanese EUC, G3 - JIS X212-1990
IBM-952 | ISO 7, DB, Japanese EUC, G1 - JIS X208-1990, including 940 UDC
IBM-5048 | ISO 7, DB, Japanese EUC, G1 - JIS X208-1990, excluding 940 UDC
IBM-5049 | ISO 7, DB, Japanese EUC, G1 - JIS X208-1990, excluding 106 IBM, 940 UDC
X2081983 | ISO 7, DB, Japanese EUC, G1 - JIS X208-1993
IBM-955 | ISO 7, DB, Japanese TCP
IBM-895 | ISO 7, SB, Japanese 7-bit Latin
IBM-896 | ISO 7, SB, Japanese 7-bit Katakana, excluding 5 SAA
IBM-1350 | ISO 8, 2022 scheme, IBM EUC, JISeucJP
IBM-1351 | DBCS PC for Open environment (HP code)

Japanese Host SBCS/DBCS <-> MBCS

| 290 | 1027 | 300 | 932 | 942 | 943 | 33722
--- | --- | --- | --- | --- | --- | --- | ---
00290 | N/A | - | N/A | Y | Y | Y | Y
01027 | - | N/A | N/A | Y | Y | Y | Y
04396 | N/A | N/A | N/A | Y | Y | Y | Y
00932 | Y | Y | Y | N/A | N/A | - | -
00942 | Y | Y | Y | N/A | N/A | - | -
00943 | Y | Y | Y | - | - | N/A | -
33722 | Y | Y | Y | - | - | - | N/A

IBM-290 | EBCDIC, SB, Japanese Katakana Extended SBCS
IBM-1027 | EBCDIC, SB, Japanese Latin Extended SBCS
IBM-300 | EBCDIC, DB, Japanese Latin, including 4370 UDC
IBM-942 | IBM-PC Data, MB, including 1880 UDC, Extended SBCS
IBM-943 | IBM-PC Data, MB, for Open Environment
IBM3372 | ISO 8, 2022 scheme, IBM EUC, IBMeucJP

Note:

- Code page 932 is a subset of code page 942. The conversion table for code page 942 will be used to convert to and from code page 932.
- Windows code page 932 is equivalent to IBM's code page 943. The conversion table for code page 943 will be used to convert to and from code page 932.

Korean MBCS <-> MBCS

| 949 | 1363 | 933 | 970
--- | --- | --- | --- | ---
00949 | Y | Y | Y | Y
01363 |  |  |  |
00933 | Y | Y | N/A | Y
00970 | Y | Y | Y | N/A

IBM-933 | EBCDIC, MB, locking shifts, including 1880 UDC, Extended SBCS
IBM-949 | IBM-PC Data, MB, IBM KS Code, including 1880 UDC
IBM-1363 | IBM-PC Data, MB, IBM KS Code, including 1880 UDC
IBM-970 | ISO 8, 2022 scheme, IBM EUC, G0, G1

Note:

- Windows code page 949 is equivalent to IBM's code page 1363. The conversion table for code page 1363 will be used to convert to and from code page 949.

Korean Host SBCS/DBCS <-> MBCS

| 833 | 834 | 949 | 1363 | 970
--- | --- | --- | --- | --- | ---
00833 | N/A | N/A | Y |  | Y
00834 | N/A | N/A | Y |  | Y
00949 | Y | Y | N/A |  | -
01363 |  |  |  | N/A |
00970 | Y | Y | - |  | N/A

IBM-833 | EBCDIC, SB, Extended SBCS
IBM-834 | EBCDIC, DB, including 1880 UDC
IBM-949 | IBM-PC Data, MB, IBM KS Code, including 1880 UDC
IBM-1363 | IBM-PC Data, MB, IBM KS Code, including 1880 UDC
IBM-970 | ISO 8, 2022 scheme, IBM EUC, G0, G1

Others (not in the table):

IBM-891 | IBM-PC Data, SB
IBM-1088 | IBM-PC Data, SB, IBM KS Code
IBM-1040 | IBM-PC Data, SB, Extended SBCS
IBM-951 | IBM-PC Data, DB, IBM KS Code, including 1880 UDC
IBM-971 | ISO 7, DB, Korea EUC, G1, including 1880 UDC
IBM-5067 | ISO 7, DB, Korea EUC, G1, excluding 1880 UDC

Traditional Chinese MBCS <-> MBCS

| 938 | 948 | 950 | 937 | 964
--- | --- | --- | --- | --- | ---
00938 | N/A | N/A | Y | Y | Y
00948 | N/A | N/A | Y | Y | Y
00950 | Y | Y | N/A | Y | Y
00937 | Y | Y | Y | N/A | Y
00964 | Y | Y | Y | Y | N/A

IBM-937 | EBCDIC, MB, locking shifts, including 6204 UDC, Extended SBCS
IBM-948 | IBM-PC Data, MB, including 6204 UDC, Extended SBCS
IBM-950 | IBM-PC Data, MB, for IBM BIG-5
IBM-964 | ISO 8, 2022 scheme, IBM EUC, G0, G1, G2

Note:

- Code page 938 is a subset of code page 948. The conversion table for code page 948 will be used to convert to and from code page 938.

Traditional Chinese Host SBCS/DBCS <-> MBCS

| 037 | 835 | 938 | 948 | 950 | 964
--- | --- | --- | --- | --- | --- | ---
00037 | Y | N/A | Y | Y | Y | Y
00835 | N/A | N/A | Y | Y | Y | Y
00938 | Y | Y | N/A | - | - | -
00948 | Y | Y | - | N/A | - | -
00950 | Y | Y | - | - | N/A | -
00964 | Y | Y | - | - | - | N/A

IBM-037 | EBCDIC, SB, CECP: USA, Canada, Netherlands
IBM-835 | EBCDIC, DB, including 6204 UDC
IBM-948 | IBM-PC Data, MB, including 6204 UDC, Extended SBCS
IBM-950 | IBM-PC Data, MB, for IBM BIG-5
IBM-964 | ISO 8, 2022 scheme, IBM EUC, G0, G1, G2

Note:

- Code page 938 is a subset of code page 948. The conversion table for code page 948 will be used to convert to and from code page 938.

Others (not in table):

IBM28709 | EBCDIC, SB, Extended SBCS
IBM-1043 | IBM-PC Data, SB, Extended SBCS
IBM-904 | IBM-PC Data, SB
IBM-1114 | IBM-PC Data, SB, IBM BIG-5
IBM-927 | IBM-PC Data, DB, including 6204 UDC
IBM-947 | IBM-PC Data, DB, IBM BIG-5
IBM-960 | ISO 7, DB, T-Ch EUC, G1
IBM-961 | ISO 7, fixed triple-byte, T-Ch EUC, G2
IBM-963 | ISO 7, DB, T-Ch TCP

Simplified Chinese MBCS <-> MBCS

| 1381 | 935 | 1383
--- | --- | --- | ---
01381 | N/A | N/A | Y
00935 | Y | N/A | Y
01383 | Y | Y | N/A

IBM-935 | EBCDIC, MB, locking shifts, including 1880 UDC, Extended SBCS
IBM-1381 | IBM-PC Data, MB, IBM GB including 1880 UDC, 31 IBM, 5 SAA SB
IBM-1383 | ISO 8, 2022 scheme, IBM EUC, G0, G1

Simplified Chinese Host SBCS/DBCS <-> MBCS

| 836 | 837 | 1381 | 1383 | 1386
--- | --- | --- | --- | --- | ---
00836 | N/A | Y | Y | Y |
00837 | N/A | N/A | Y | Y |
01381 | Y | Y | N/A | - |
01383 | Y | Y | - | N/A |
01386 |  |  |  |  | N/A

IBM-836 | EBCDIC, SB, Extended SBCS
IBM-837 | EBCDIC, DB, including 1880 UDC
IBM-1381 | IBM-PC Data, MB, IBM GB, including 1880 UDC, 31 IBM, 5 SAA SB
IBM-1383 | ISO 8, 2022 scheme, IBM EUC, G0, G1
IBM-1386 | IBM-PC Data, MB, IBM GB, including 1880 UDC, 31 IBM, without 5 SAA SB

Others (not in tables):

IBM-1115 | IBM-PC Data, SB, IBM GB, including 5 SAA SB char
IBM-1042 | IBM-PC Data, SB, Extended SBCS
IBM-903 | IBM-PC Data, SB
IBM-1380 | IBM-PC Data, DB, IBM GB, including 1880 UDC and 31 IBM
IBM-946 | IBM-PC Data, MB, including 1880 UDC, Extended SBCS
IBM-5478 | ISO 7, DB, GB, excluding 31 IBM and 1360 UDC
IBM-1382 | ISO 7, DB, GB, including 31 IBM and 1360 UDC

UCS-2

All code pages can be converted to and from UCS-2, which is also known as IBM-1200. You must code "UCS-2" in the invocation of iconv_open. "IBM-1200" is not recognized.

CPPRUT36.DLL

Because UCS-2 can be converted to CPPRUT36.DLL, this implies that all code pages can be converted to CPPRUT36.DLL via UCS-2. CPPRUT36.DLL is also known as IBM-1208, but you must code "CPPRUT36.DLL" in the invocation of iconv_open. "IBM-1208" is not recognized.

Internationalization

Make Your Program International
Convert Character Coding