utledgtfextd (Command to expand the external character table)
This command creates the file for external character table expansion. The command also displays the content of the file for external character table expansion in the standard output.
Grade |
User type for DataMagic |
Executability |
---|---|---|
DataMagic Server |
Superuser |
Executable |
General user (#1) |
Not executable |
|
DataMagic Desktop |
- |
Not executable |
#1 |
: |
The -o option can be executed by ordinary users also. |
Hereafter, incode refers to the input kanji code type, and outcode refers to the output kanji code type.
Commands
utledgtfextd -i {XY|a} [-path gaijipath]
utledgtfextd -o {XY|a} [-path gaijipath]
Parameters
-i XY
Creates the file for external character table expansion. (This parameter cannot be omitted.)
Specify the incode identification character in X and the outcode identification character in Y.
If you enter a instead of specifying XY, all files for external character table expansion are created.
For details about identification characters, see Table 1.15 incode/outcode identification character combinations.
- Example:
-
- -i es
-
: Creates a EUC-to-Shift JIS file for external character table expansion.
- -i a
-
: Creates a file for external character table expansion for all combinations.
Using the -i parameter overwrites the existing file for external character table expansion.
To append additional external characters to the existing file for external character table expansion, follow these steps:
-
Redirect the content of the existing file for external character table expansion that was displayed using the -o parameter and save it in an external character table file.
-
Edit the file in step 1 by adding new external characters.
-
Using the file in step 2,
use the -i parameter to create the file for external character table expansion.
-o XY
Displays the content of the file for external character table expansion in the standard output. (This parameter cannot be omitted.)
Specify the incode identification character in X and the outcode identification character in Y.
If you enter a instead of specifying XY, the content of all files for external character table expansion is displayed in standard output. For details about the identification characters, see Table 1.15 incode/outcode identification character combinations.
- Example:
-
- -o es
-
: Displays the content of EUC-to-Shift JIS file for external character table expansion.
- -o a
-
: Displays the content of files for external character table expansion for all combinations to standard output.
-path gaijipath
Path name of the folder where the folder gtf, storing the file for external character table, is stored. (This parameter can be omitted.)
Use a string of 1 to 200 bytes of characters (Windows) or alphanumeric characters and symbols (UNIX).
When the command is executed, the gtf folder in the specified path is read.
If this parameter is omitted, the default path or the current folder is assumed; the default path is the shared data storage folder (Windows) or DMPATH (UNIX).
When using the -path parameter, specify "Path of the external character conversion table" on the Data Processing Settings screen (Output Setting).
The following table provides the incode/outcode identification character combinations:
The maximum size that can be registered varies depending on the selected encoding. For the default code, the maximum size that can be registered varies depending on the encoding selected on the output side.
The table below provides information about Kanji code types and the maximum size that can be registered.
Kanji code type |
Maximum size |
---|---|
UTF-8 UTF-16 |
16 bytes |
Other |
8 bytes |
Example of using the command to expand the external character table
This example shows the conversion of the Shift JIS code character ㈱ (0x878a) to the JEF code character ㈱ (0x78d5).
The following explains how to make these settings.
In the following example, the system administration folder is set to C:\HULFT Family\huledpro\etc.
1. Edit the Shift JIS-to-JEF file for the external character table.
The file is a text file. Use Notepad (on Windows), vi (on UNIX), or another editor to edit the file.
The file for the external character table exists in the following location:
- For Windows:
-
gtf folder in the shared data storage folder
- For UNIX
-
$DMPATH/gtf
Content of the file for the external character table
- For Windows
-
C:\HULFT Family\huledpro\etc\gtf\gtstoj.txt
- For UNIX
-
/home/huled/etc/gtf/gtstoj.txt
# # SHIFT-JIS -> JEF # # default output code defaultcode=0xa2a2 #incode #outcode 0x878a 0x78d5
#: Lines that begin with a hash mark (#) are comments.
When specifying UTF-16 codes, specify the byte order as Big-endian.
Even when the input and output use the same kanji code type, the defaultcode= line is inserted within the file for the external character table. This is only in order to apply the same convention to the files for the external character table. For the combination of the same kanji codes, the set value is just ignored. If the same kanji code type is specified for both the input and output, whichever character is not listed in the external character table is output as is.
2. Create the file for external character table expansion.
- For Windows:
-
C:\>"C:\HULFT Family\huledpro\utledgtfextd" -i sj -path "C:\HULFT Family\huledpro\etc"
-
C:\HULFT Family\huledpro\etc\gtf\gtstoj.txt is read to create C:\HULFT Family\huledpro\etc\gtf\gtstoj.xtd.
-
If you omit -path, gtstoj.xtd is created in the gtf folder in the system administration folder.
-
- For UNIX
-
% utledgtfextd -i sj -path /home/huled/etc
-
/home/huled/etc/gtf/gtstoj.txt is read to create /home/huled/etc/gtf/gtstoj.xtd.
-
If you omit -path, $HULPATH/gtf/gtstoj.xtd is created.
-
3. Check the expansion file.
- For Windows
-
C:\>utledgtfextd -o sj -path "C:\HULFT Family\huledpro\etc"
-
The content of C:\HULFT Family\huledpro\etc\gtf\gtstoj.xtd is displayed.
-
If you omit -path, the content of gtstoj.xtd that exists in the gtf folder in the system administration folder is displayed.
-
- For UNIX
-
% utledgtfextd -o sj -path /home/huled/etc
-
The content of /home/huled/etc/gtf/gtstoj.xtd is displayed.
-
If you omit -path, $HULPATH/gtf/gtstoj.xtd is displayed.
-
To recover the initial state of the external character table, save the text file without specifying incode and outcode, and then execute the command to expand the external character table.