02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter —Character Sets and Fonts<br />

UTF-8 Character Set<br />

The UTF-8 (Universal character set Transformation Format-8) was devised<br />

to be a character set which encodes all Unicode characters while maintaining<br />

compatibility with the US-ASCII (0 to 127 dec.) range of characters.<br />

The UTF-8 character set is available from Fingerprint v8.50. UTF-8 data<br />

is encoded with 1, 2, 3 or 4 bytes, depending on the character number<br />

range. The table below shows the UTF-8 binary sequences corresponding<br />

to the Unicode character number. Characters requiring a UTF-8 sequence<br />

of four bytes are currently not supported.<br />

Unicode character number range UTF-8 Byte sequence<br />

Hex range Binary Binary<br />

0000-007F x 7 x 6 x 5 x 4 x 3 x 2 x 1 0x 7 x 6 x 5 x 4 x 3 x 2 x 1<br />

0080-07FF y 5 y 4 y 3 y 2 y 1 x 6 x 5 x 4 x 3 x 2 x 1 110y 5 y 4 y 3 y 2 y 1 10x 6 x 5 x 4 x 3 x 2 x 1<br />

0800-FFFF z z z z y y y y y y x x x x x x 4 3 2 1 6 5 4 3 2 1 6 5 4 3 2 1 1110z z z z 10y y y y y y 10x x x x x x 4 3 2 1 6 5 4 3 2 1 6 5 4 3 2 1<br />

010000-<br />

10FFFF<br />

Not currently supported.<br />

The following table outlines the procedure to convert a Unicode character<br />

code in hexadecimal format to the UTF-8 byte decimal value necessary to<br />

print the characters.<br />

Procedure explanation Example<br />

Identify your desired character and its<br />

Unicode Hex value. Identify the range it<br />

belongs to in order to find the number of<br />

bytes necessary for UTF-8 encoding, see<br />

table above.<br />

Cyrillic capital letter ZHE: Ж<br />

Hex value: 0416<br />

0416 is in the range 0080-07FF and<br />

requires thus two bytes to be encoded.<br />

Convert to binary 10000010110<br />

Identify x i and y j bits (and z k if applicable)<br />

as shown in the table above. Start from the<br />

least significant digits to the right and pad<br />

with zeroes to the left if necessary.<br />

Convert the bytes to decimal format and<br />

use these in your print command.<br />

1 1 0 y 5 y 4 y 3 y 2 y 1 1 0 x 6 x 5 x 4 x 3 x 2 x 1<br />

1 1 0 1 0 0 0 0 1 0 0 1 0 1 1<br />

0<br />

208 150<br />

prtxt chr$(208)+chr$(150)<br />

Note: The conversions between hex-binary-decimal can be done with most<br />

scientific calculators (for example the Windows calculator).<br />

The UTF-8 character set is invoked using NASC 8, NASC "UTF-8" or<br />

NASCD "UTF-8". When selecting UTF-8 with the NASC command, the<br />

font must be selected with the FONT command. Disable UTF-8 encoding<br />

by choosing a different character set with the NASC command.<br />

Use FONTD to select the desired font if you invoke UTF-8 with the<br />

NASCD command. Having selected UTF-8 with the NASCD command,<br />

you must actively disable it with NASCD "" before returning to a singlebyte<br />

character set.<br />

Note: In order to avoid confusion between active character sets and fonts,<br />

it is recommended that you use only the NASC and FONT commands<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!