Unicode Input and Output Handling in Natural Applications

This document covers the following topics:


Displaying and Entering Unicode Data

If you want to display or enter Unicode data, the following possibilities exist:

  • When working in the local development environment with Natural for Windows, all Unicode characters can be displayed and entered in the Natural output window.

  • When working in a remote development environment with Natural for Windows (SPoD), the Natural Web I/O Interface client (see below) is necessary for displaying and entering all Unicode characters.

  • When running applications with Natural for Linux, Natural for Mainframes or Natural for Windows, see Natural Web I/O Interface Client below.

Notes:

  1. Even if you are working with a Unicode-enabled output interface on Windows, you will see only the Unicode characters which are supported by the currently selected font.
  2. If you are working with the Unicode-enabled output window on Windows, characters which are not contained in the current code page will be ignored when entering data in A format fields if the parameter CPCVERR is ON.
  3. Unicode data cannot be displayed on 3270 terminals.

If you run Natural via a terminal emulation or a mainframe terminal such as IBM 3270/3279, the page will be converted to the default code page (value of the system variable *CODEPAGE) before displaying it, so that all characters which are not contained in the default code page are replaced with the substitution character. Equally, input is only possible in code page format and will be converted to Unicode format before assigning it to a U format field. You have to regard that the substitution character is defined by the ICU conversion tables. Depending on this character, it is possible that garbage is displayed with a terminal emulation. On Linux platforms, you can change this substitution character by setting the profile parameter SUBCHAR. However, it is strongly recommended that you use the Natural Web I/O Interface when displaying characters not contained in the default code page. When running a remote Windows session, the Natural Web I/O Interface will be used in any case.

On code page oriented mainframe terminals, it is important to select the suitable code page. The default code page of Natural, the code page of the terminal and even the font used by the terminal determine the capability of displaying certain characters correctly.

Natural Web I/O Interface Client

The Natural Web I/O Interface client is used to display non-GUI information which contains Unicode characters. It can be used in the following environments:

SPoD Environment

The Natural Web I/O Interface client can be invoked when you use Natural for Windows and you are working with Natural Studio in a remote development environment (SPoD); see Natural Web I/O Interface Client in Remote Development Using SPoD which is part of the Natural for Windows documentation.

When the Natural Web I/O Interface client is used, the Web I/O window appears instead of the terminal emulation window which is not Unicode-enabled in remote Linux or mainframe environments, or instead of the output window in remote Windows environments.

The following graphic shows the SPoD environment for Unicode applications with Natural Development Servers (NDV) on Linux and mainframes:

SPoD environment

So that the Natural Web I/O Interface client can be invoked, the Natural Development Server has to be configured as follows:

  • Linux
    If you want to use the Natural Web I/O Interface client in a remote Linux environment, the profile parameter WEBIO must be set to ON on the NDV server. See Configuration Utility in the Natural for Linux and Cloud documentation.

  • Mainframe
    If you want to use the Natural Web I/O Interface client in a remote mainframe environment, the NDV configuration parameter TERMINAL_EMULATION must be set to WEBIO on the NDV server. See NDV Configuration Parameters in the Natural Development Server documentation. The Natural profile parameter TMODEL can be used to determine the user screen size.

  • Windows
    In a remote Windows environment, the Natural Web I/O Interface client is always used, regardless of the setting of the profile parameter WEBIO.

Runtime Environment

The Natural Web I/O Interface client appears when running applications with Natural. It runs in a web/application server.

The following graphic shows the runtime environment for Unicode applications:

Runtime environment

Natural recognizes automatically whether the session has been started from the Natural Web I/O Interface client or from the terminal emulation.

Prerequisites for using the Natural Web I/O Interface client:

  • Natural for Linux
    It is required that the Natural Web I/O Interface server (which is implemented as a daemon) has been installed and activated. See Natural Web I/O Interface in the Natural for Linux and Cloud documentation.

  • Natural for Windows
    It is required that the Natural Web I/O Interface server (which is implemented as a service) has been installed and activated. See Natural Web I/O Interface in the Natural for Windows documentation.