|HP-UX Reference > E
eucset(1)HP-UX 11i Version 3: February 2007
eucset — set and get code widths for ldterm
eucset [ [-c HP15-codeset] or [-c UTF8] or [-c ASIAN_UTF8] or [-c GB18030] or [cswidth] ]
The eucset command sets or gets (reports) the encoding and display widths of the Extended UNIX Code (EUC), UCS Transformation Format (UTF8), or GB18030 characters processed by the current input terminal. EUC is an encoding method for codesets composed of single or multiple bytes. EUC permits applications and the terminal hardware to use the 7-bit US ASCII code and up to three single byte or multibyte codesets simultaneously.
ldterm is a STREAMS terminal line discipline module which obtains codeset information from eucset. See ldterm(7).
The cswidth value defines the character widths for codesets. If cswidth is not implicitly or explicitly defined by passing no argument to the eucset command, the cswidth value is determined by the following criteria in descending priority:
This command must be used to specify EUC or non-EUC codesets, whether they are single byte or multibyte. However, the eucset command can correctly set the cswidth parameter without using any options in most cases except for ASIAN_UTF8. See the WARNINGS section for special warnings on the values of the cswidth argument.
For the GB18030, ASIAN_UTF8, or UTF8 setting, use the -c option.
The eucset command recognizes the following options and arguments:
EUC Code Set Classes
EUC divides codesets into four classes. Each codeset has two characteristics: the number of bytes for encoding the characters in the codeset, and the number of display columns to display the characters in the codeset. All characters within a codeset possess the same characteristics. ASIAN_UTF8 is used for setting double width display, and UTF8 is used for single width.
The cswidth argument in the eucset command line is a character string that describes the character widths for codesets 1 through 3. This command does not allow the user to modify the settings for codeset 0. The character string is of the following format:
The values for the column widths may be omitted if they are equal to the number of encoding bytes. If the encoding value of any of the EUC codesets is set to 0 (zero), then the codeset does not exist. See the WARNINGS section for special warnings on the values of the cswidth argument.
If no cswidth argument is supplied, the eucset command uses the value of the CSWIDTH environment variable. If this variable is not present, the following default string is substituted:
This default string designates that the environment uses a single byte EUC codeset that has characters in the EUC codeset 1 format. If the environment uses a multibyte EUC codeset in the codeset 1 format, single byte or multibyte EUC codesets in the codeset 2 or 3 format, or both, the default setting cannot be used.
To display the encoding and display widths for the EUC codesets 1 to 3 in your environment, enter:
Assuming eucset has been previously used to set for ja_JP.eucJP, the entry generates the following:
To change the current settings of the encoding and display widths for the EUC characters in codesets 1 and 2 to two bytes each, enter one of the following:
To set the encoding and display widths for the EUC characters in the locale ja_JP.eucJP, enter:
For zh_TW.eucTW, enter:
For ko_KR.eucKR, enter:
To set the code width to that of UTF8, enter:
eucset -c UTF8
To set the code width to that of ASIAN_UTF8, enter:
eucset -c ASIAN_UTF8
To set the code width to that of GB18030, enter:
eucset -c GB18030
The cswidth argument does not include the SS2 or SS3 bytes in the byte width values.
This command is not specified by standards, may not be available on other vendor's systems, and may be subject to change or obsolescence in a future release.