Converting character width
You can convert the width of characters by using the TRANS_WN and TRANS_NW actions.
The TRANS_WN action converts full-width characters to half-width characters. The TRANS_NW action converts half-width characters to full-width characters.
If you use these actions, specify the CJK tokenizer by using the TOK command with an appropriate locale variable in the PRAGMA section of the pattern-action file. The CKJ tokenizer handles tokens based on the conventions of languages that are not Latin-based. For example, to use the TRANS_WN action to convert full-width Japanese characters to half-width characters, specify TOK ja_JP.
Although the syntax for these actions is similar to the syntax for the CONVERT action, these actions do not use lookup tables and cannot convert an object to a literal. For example, you can use the following syntax for the TRANS_WN action:
TRANS_WN source TKN | TEMP retype1
| Argument | Description |
|---|---|
| source | The object that is converted. The source can be an operand, dictionary field, or user variable. |
| retype1 | The token class that you want assigned to the converted token. This argument is optional. |