[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]
AIX Version 4.3 Commands Reference, Volume 5
uconvdef Command
Purpose
Compiles or generates a UCS-2 (Unicode) conversion table for use by the iconv library.
uconvdef [ -f SrcFile ] [ -v ] UconvTable
Description
The uconvdef command reads SrcFile and creates a compiled conversion table in UconvTable. The SrcFile defines a mapping between UCS-2 and multibyte code sets (one or more bytes per character). The UconvTable is in a format that can be loaded by the UCSTBL conversion method located in the /usr/lib/nls/loc/uconv directory. This method uses the table to support UCS-2 conversions in both directions.
Flags
-f SrcFile |
Specifies the conversion table source file. If this flag is not used, standard input is read. |
-v |
Causes output of the processed file statements. |
UconvTable |
Specifies the path name of the compiled table created by the uconvdef command. This should be the name of the code set that defines conversions into and out of UCS-2. |
Exit Status
The following exit values are returned:
0 |
Successful completion. |
>0 |
An error occurred. |
Examples
To access the compiled UCS-2 conversion table:
- Create the compiled UconvTable using the name of the multibyte code set. For example, the conversion table between IBM-850 and UCS-2 can be compiled as follows:
uconvdef -f IBM-850.ucmap IBM-850
- Place the table in a directory called uconvTable. The default system directory is /usr/lib/nls/loc/uconvTable. If another directory is used, the LOCPATH environment variable needs to be set to include the parent directory (for example, /usr/lib/nls/loc).
mv IBM-850 /usr/lib/nls/loc/uconvTable
- Create symbolic links for conversions in each direction in a directory called iconv. The names for these links should be formed by concatenating the "From" code set and the "To" code set, separated by an underscore. The links should be set to point to the /usr/lib/nls/loc/uconv/UCSTBL conversion method. The default directory for these links is /usr/lib/nls/loc/iconv. If another directory is used, the LOCPATH environment variable needs to be set to include the parent directory (for example, /usr/lib/nls/loc).
ln -s /usr/lib/nls/loc/uconv/UCSTBL \
/usr/lib/nls/loc/iconv/IBM-850_UCS-2
ln -s /usr/lib/nls/loc/uconv/UCSTBL \
/usr/lib/nls/loc/iconv/UCS-2_IBM-850
Note: The \ (backslash) is a line continuation character that is only needed if the command is broken into two lines.
Related Information
The iconv command.
The iconv subroutine, iconv_close subroutine, iconv_open subroutine.
The unconvdef source file format.
Code Set Overview in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.
Converters Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.
List of UCS-2 Interchange Converters in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]