This document covers the following topics:
Substitution Characters Used When a Character Cannot Be Converted
Using Natural Sources with Previous Natural Versions That Are Not Code Page Enabled
The code page you have defined with the profile parameter
CP
does
either not exist (see
http://demo.icu-project.org/icu-bin/convexp
for valid ICU code pages and
http://www.iana.org/assignments/character-sets
for the appropriate IANA names) or is an invalid default code page for the
platform (for example, an ASCII code page cannot be used on a mainframe
platform).
Check whether the same IANA name, CCSID/CCSN or alias name
as specified in
NATCONFG
is used.
The default code page is the code page which is the result of the
evaluation of the profile parameter CP
.
The default code page which is used by Natural for conversions between code page and
Unicode and vice versa can be detected by displaying the content of the system variable
*CODEPAGE
.
You can display all settings using the system command CPINFO
.
Use the MOVE
ENCODED
statement for conversion from UTF-8 to UTF-16: the
code page "UTF-8" has to be used for the A format
variable.
Check if you are using the correct code page. If the code page is correct, check if the selected font supports the characters you want to display.
The source is saved with the code page at creation time. You get a conversion error when the source could not be converted from the code page of the saved source into the code page of the current Natural session. You can start Natural with the code page of the source to avoid conversion or you can adjust non-convertible characters in the window which appears when the editor is started.
If you are connected to a mainframe environment via SPoD, the source from the mainframe is converted and edited in Unicode in the SPoD environment. If it is saved, it has to be converted into the code page of the Natural server. A conversion error may occur if a Unicode character is not mapped in the code page of the Natural server session.
If you are in a native Natural for Mainframes environment (without SPoD) you do not get errors when saving a source since a conversion is not performed. The source is saved with the code page information of the current Natural session.
Code page information is part of the Natural source
directory. Use the LIST
DIR
command to display the directory.
You should start your Natural session with the desired code
page using the CP
parameter. Set the
parameter SRETAIN
to
OFF
, edit the source and save it. Now the source has the modified
code page information. Or, you can use the SYSCP
utility to check or
change the code page assignment of a source.
The substitution character of the code page or, if specified in the configuration file, the place holder character is used.
With previous Natural versions that are not code page enabled, it is possible to access sources that have been saved with code page information. The layout of the source has not been changed and the code page information will simply be ignored if the source is accessed with a previous version.