Problem:
In KB 19658 the following line:
"Micro Focus Server Express v4.0 SP1and above supports UTF-8 in a PIC X field. You do not have to do anything special. That is, you do not have to specify any directives. The character is held in one byte." appears to be incorrect when using Oracle.
UTF-8 database name conatins a letter that is not ANSI. The letter is like an uppercase O with a forward slash on top of it.
The COBOL program gives a "?" for that character.
Is there any setting that will proper translate this character?
Resolution:
Please refer to Oracle's Pro*COBOL Programmer's Guide and also their Globalization Support Guide or consult with Oracle.
Environment variables NLS_LANG and LANG should be specified.
NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
LANG=en_US.UTF-8
Note:
The data is stored as UTF-8, so not all the characters are displayable (some are, some are not) if COBOL receives the characters from the database in a raw form.
Oracle itself provides the solution to this, and it is the NLS_LANG environment variable. Here, Oracle is told how to translate all UTF-8 data for all client applications, including COBOL.
The NLS_LANG setting tells Oracle, my codepage is 1252, please translate UTF-8 data to codepage 1252, so I can display it.
COBOL plays no role in this --- it is all Oracle.
Please review Oracle documentation, in particular the "Globalization Support Guide".



