3.12.3 Printer Translation Tables

In printing, translation tables can be used to swap one character for another. For example, you might want to convert carriage return characters to line feed characters. When you use translation tables, you can accomplish this without modifying the actual data.The printer translation table included with Accessory Manager is CRTOLF.TBL, which converts a carriage return character into a line feed character.

To create a translation table

  1. Using any text editor such as Notepad, open a text file.

  2. Type the desired script for the translation table.

  3. Save the file.

    Be sure to use the .TBL file extension.

To edit a translation table

  1. Using any text editor such as Notepad, open the desired .TBL file.

  2. Make the desired changes in the file.

  3. Save the file.

    The changes will take effect the next time you open a session that uses the selected translation table.

Printer .TBL File Syntax

Each printer .TBL file is a script that indicates which characters will be replaced with which other characters. These files use the following format. The items in brackets are optional. If you use these items, do not type the brackets.

For information about each line of this syntax, click the desired line.

Table 3-25 Printing Syntax Descriptions

Syntax Name

Description

[NAME "table_name"]

Indicates a name for the translation table. It appears in the script for information purposes only.

The table_name can be up to 31 characters long and can contain spaces. It must be enclosed in double quotation marks (").

[DESC "table_description"]

Indicates a description for the translation table. It appears in the script for information purposes only.

The table_description can be up to 80 characters long and can contain spaces. It must be enclosed in double quotation marks (").

[DIM number]

Indicates the length of the character strings being translated by this translation table.

[INVERT]

Indicates that the translation table should be inverted.

For example, if the translation table says A=B and you include the INVERT command, the inverse value is applied (that is, B=A).

[IMPORT "filename.ext"]

Indicates which additional script file to execute.

For example, if you saved your translation script in a file called XLATE.TBL, you could execute it by including the statement IMPORT XLATE.TBL in this script.

BEGIN

This command indicates the beginning of the character translation script.

'x'='y'

Indicates the characters being translated.

Unless you include an INVERT command, the character on the left is the character being translated, and the character on the right is the character that will be used in its place.

END

Indicates the end of the character translation script.