Frequently Asked Questions

This document covers the following topics:


Why do I get the startup error "Invalid code page specified"?

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.

What is the "default code page"?

The default code page is the code page which is the result of the evaluation of the profile parameter CP.

What default code page is used?

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.

How can I display all relevant Natural code page settings?

Use the system command CPINFO.

How can I handle UTF-8 encoding with Natural code?

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.

Why are some characters not displayed correctly?

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.

Why do I get an error when I want to edit a Natural source?

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.

Why do I get an error when I want to save a Natural source?

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.

How can I find out the encoding of a Natural source?

Code page information is part of the Natural source directory. Use the LIST DIR command to display the directory.

How can I change the encoding of a Natural source?

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.

Which substitution character is used if a character cannot be converted?

The substitution character of the code page or, if specified in the configuration file, the place holder character is used.

Can I use Natural sources with previous Natural versions that are not code page enabled?

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.