66
UBI EasyCoder 301 Direct Protocol – Programmer's Guide Ed. 1
Chapter 9 Advanced Features
To be exact, the double-byte mappings allow an ASCII string to
contain a mixture of single-byte and double-bytes codes. For exam-
ple, in the BIG5 mapping, any ASCII character with value 160 or
greater is the first byte of a double-byte code, while the remaining
characters form single-byte codes. So, in BIG5, the ASCII string
“
< 1 6 0 > < 6 4 > < 6 5 >
” splits into the double-byte code
“
<160><64>
” and the single-byte code “
<65>
”. In the EasyCoder
301, the current NASCD table specifies both how to divide an ASCII
string into single-byte and double-byte codes and also how the dou-
ble-byte codes are mapped to unicodes. The current NASC table
specifies how the single-byte codes are mapped to unicodes. The
relevant commands are:
NASC <character set no.> | <"file name">
NASCD “<NASCD table file>”
<character set no.> one of the values listed in chapter 6.11
<"file name">
one of the character set names listed in chap-
ter 6.11 or the name of a user-defined NASC
table (see later in this chapter)
<NASCD table file>
the file name of a NASCD table.
Default:
NASCD "" (empty string; disables double-
byte interpretation of ASCII strings)
Double-byte fonts
As discussed above, the ASCII data input to text fields and human
readable parts of bar codes can contain a mixture of single-byte and
double-byte codes, which are mapped to unicodes by the
NASC
and
NASCD
settings respectively. The characters for the single-byte
codes are printed using the current single-byte font, as specified by
the
FONT
command (see chapter 4.3). The characters for the double-
byte codes are printed using the current double-byte font, as speci-
fied by the following commands:
FONTD | FD “<font file name>” [,<font size>,<font slant>]
<font file name>
the name of a Speedo or TrueType font file; it
must be enclosed by double quotation marks.
<font size>
the height of the characters in points (a point
is a standard typographic unit, equal to 1/72
inches).
<font slant>
the italic angle of the characters in degrees;
a positive value slants the characters clock-
wise away from the vertical. Default: 0.
Reset to default by:
PRINTFEED|PF
2. Using
International
Character Sets,
cont'd.