Help and Troubleshooting

#### Search Results

Search

# Help and Troubleshooting

This document covers the following topics:

- Receiving the Startup Error "Invalid Code Page Specified"

- The Default Code Page

- Displaying All Relevant Natural Code Page Settings

- Handling UTF-8 Encoding with Natural Code

- Incorrectly Displayed Characters

- Receiving an Error When Editing a Natural Source

- Receiving an Error When Saving a Natural Source

- Finding out the Encoding of a Natural Source

- Changing the Encoding of a Natural Source

- Substitution Characters Used When a Character Cannot Be Converted

- Using Natural Sources with Previous Natural Versions That Are Not Code Page Enabled

## Receiving 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.

## The Default Code Page

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`.

## Displaying All Relevant Natural Code Page Settings

You can display all settings using the system command `CPINFO`.

## Handling 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.

## Incorrectly Displayed Characters

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.

## Receiving an Error When Editing 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.

## Receiving an Error When Saving 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.

## Finding 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.

## Changing 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.

## Substitution Characters Used When 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.

## Using 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.

### On this page

- Receiving the Startup Error "Invalid Code Page Specified"
- The Default Code Page
- Displaying All Relevant Natural Code Page Settings
- Handling UTF-8 Encoding with Natural Code
- Incorrectly Displayed Characters
- Receiving an Error When Editing a Natural Source
- Receiving an Error When Saving a Natural Source
- Finding out the Encoding of a Natural Source
- Changing the Encoding of a Natural Source
- Substitution Characters Used When a Character Cannot Be Converted
- Using Natural Sources with Previous Natural Versions That Are Not Code Page Enabled