Supported country codes

Visual COBOL has built-in country support for EBCDIC <-> ASCII character set translations.

When you use the _CODESET library routine to convert a string between EBCDIC and ASCII, the MFCODESET environment variable manages and selects the appropriate EBCDIC <-> ASCII translation for your applications, based on its specified value or default behavior.

The table below shows the possible MFCODESET values (also known as country codes), and their corresponding EBCDIC Coded Character Set Identifiers (CCSIDs) and languages.

Originally, this table reflected the country codes established by the International Telecommunication Union (ITU), but it has since been expanded to include Chinese, Japanese, and Korean (CJK) extensions.

Support is provided for the following character set translations:

  • EBCDIC <-> ASCII
  • EBCDIC <-> ASCII with Euro support for single-byte character sets

For Euro enablement (€), prefix your MFCODESET value with "E".

Country Code

(MFCODESET)

EBCDIC CCSIDs Language
AUTOMATIC

AUTO

Operating system default - sets country code based on CBL_GET_OS_INFO
DEFAULT Set to 0437 (US English) on Windows, or 0081 (Japanese Katakana Extended) on Japanese Windows.
0031 37, 1140 Dutch
0033 297, 1147 French
0034 284, 1145 Spanish
0039 280, 1144 Italian
0043 273, 1141 German (Austrian)
0044 285, 1146 UK English
0045 277, 1142 Danish
0046 278, 1143 Swedish
0047 277, 1142 Norwegian
0049 273, 1141 German
0066 838 Thai Extended
0081† 930 (290, 300) * Japanese Katakana Extended
0082 933 (833, 834) *Korean
0086 13676 (836, 837) *Simplified Chinese
0351 37, 1140 Portuguese
0358 278, 1143 Finnish
0420 420 Arabic

See Arabic Support Considerations below.

0437 37, 1140 US English
0500 500, 1148 International (Latin 1)
0886 937 (37, 835) *Traditional Chinese
0930 † 930 (290, 300) *Japanese Katakana Extended
0939 † 939 (1027, 300) *Japanese Latin Extended
9122 † 9122 (290, 300) *Japanese Katakana

Character sets marked with an asterisk (*) are capable of mixed single-byte and double-byte character translation. EBCDIC CCSIDs in these rows indicate the mixed-byte CCSID first, followed by the single-byte, then double-byte Code Page Global Identifiers (CPGIDs) in parenthesis.

MFCODESETs marked with a dagger (†) are based on the Japanese International Standard (JIS) X 0208 1978 revision. Additional translation tables are available based on the Japanese International Standard (JIS) X 0208 1990 revision (and are taken from IBM's translation tables CCSID 300 - 941); to use these tables instead of the default ones, set the MFCODESET_DBCS environment variable to 941.

Other EBCDIC CCSIDs in parentheses reflect a 'non-Euro, Euro' pair for appropriate country codes.

If you set an invalid country code, the DEFAULT country code setting is used.

For database applications using a DBMS server on Windows, use the table above.

For database applications accessing a UNIX database created with single-byte character sets 819 or 923, use the following table:

Country Code

(MFCODESET)

EBCDIC CCSIDs Languages
1140 37,1140 Dutch US English Portuguese
1141 273,1141 German (Austrian) German
1142 277,1142 Danish Norwegian
1143 278,1143 Swedish Finnish
1144 280,1144 Italian
1145 284,1145 Spanish
1146 285,1146 UK English
1147 297,1147 French
1148 500,1148 International (Latin 1)