[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


genxlt Command

Purpose

Generates a code set conversion table for use by the lconv library.

Syntax

genxlt [OutputFile ]

Description

The genxlt command reads a source code set conversion table file from standard input and writes the compiled version to the file specified by the OutputFile parameter. If a value is not specified for the OutputFile parameter, standard output is used. The source code set conversion table file contains directives that are acted upon by the genxlt command to produce the compiled version.

The format of a code set conversion table source file is:

A line where the offset is 'SUB' is used to specify the default substitution character.

If the table is set to 'substitution', the iconv converter using this table uses the SUB value for this offset.

If the value is set to 'invalid', the iconv converter using this table returns error for its offset.

If the offset is found in the source code set conversion table file multiple times, the last entry is used in the compilation of the translation table.

The offset and value must be in the range of 0x00 through 0xff, inclusive.

The following is an excerpt of a code set conversion table:

SUB     0x1a     substitute character
0x80    0xc7     C  cedilla
0x81    0xfc     u  diaeresis
0x82    0xe9     e  acute
0x83    0xe2     a  circumflex
0x84    0xe4     a  diaeresis
0x85    0x40     a  grave
0x9F            substitution
0xff            invalid

If successful, the genxlt command exits with a value of 0. If the output file cannot be opened, the genxlt command is unsuccessful and exits with a value of 1. If a syntax error is detected in the input stream, the genxlt command will exit immediately with a value of 2, and write to standard error the line numbers where the syntax error occurred.

The name of the file generated by the genxlt command must follow the naming convention below in order for the iconv subsystem to recognize it as a conversion file:

fromcode: "IBM-850"
tocode: "ISO8859-1"
conversion table file: "IBM-850_ISO8859-1"

The conversion table file name is formed by concatenating the tocode file name onto the fromcode file name, with an underscore between the two.

Example

To generate a non-English, user-defined code set conversion table, enter:

cp  /usr/lib/nls/loc/iconvTable/ISO8859-1_IBM-850_src  $HOME
vi  $HOME/ISO8859-1_IBM-850_src
genxlt  <  $HOME/ISO8859-1_IBM-850_src  >  cs1_cs2

Related Information

The iconv command.

The iconv_open subroutine, iconv subroutine, and iconv_close subroutine provide a method to use the conversion service from within a program.

National Language Support Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

Converters Overview for System Management in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]