String Parameter

Some commands require a string parameter. In the chapter Command Description, string parameters are always described as type "string" in the corresponding parameter tables.

Note

Syntax in iLCD Manager XE:

\iDTHello World!\0

When entering codepage strings in iLCD Manager XE (using Write Text resp. Get Text Extent), the character codes are interpreted according to the codepage of the current macro, message or device terminal. Purple underlined characters indicate that they do not exist in this codepage.

As codepage strings are interpreted byte-wise, any word (2 bytes) or long (4 bytes) values will be interpreted as string characters. For example, \X3 will be interpreted as the ASCII values for '\' (0x5C), 'X' (0x58) and '3' (0x33) and "\X3" will be displayed.

The actual bytes sent via the interface can be verified in the "Hex" part of any editor panel. The sequence for the above example would look like this (ASCII characters are interpreted in this case):

AAH·D·T·H·e·l·l·o·20H·W·o·r·l·d·!·00H

Unicode Strings

From firmware version 4.0 onward, iLCDs support the display of Unicode fonts too. In these, every character is addressed by a 2-byte character code (0x0001 .. 0xFFFF) thus allowing for a wider range of available glyphs (symbols). They can be used to depict languages like Chinese, Japanese, Korean, Cyrillic, Hebrew and many more.

In the ASCII range (0x00 .. 0xFF), the Unicode character codes correspond with the ones of the codepage 1252 (ANSI - Latin I) including the regional characters for most Latin languages (English, Spanisch, French, German,...) starting from 0x80. When selecting any other codepage, this second half of characters contains other region-specific glyphs and is then not corresponding with the Unicode values any more.

The following table shows a few examples for character codes in different codepages as well as in the Unicode character set, no character code means the symbol is not present in the respective codepage:

Codepage A ä δ
1252 (ANSI - Latin I) 0x41 0xE4 - -
1253 (ANSI - Greek) 0x41 - 0xE4 -
65001 (Unicode) 0x0041 0x00E4 0x03B4 0x4EA4

Therefore it is possible to output single-byte strings with a Unicode font as long as the "Basic Latin" language script is included when converting the font in iLCD Manager XE. In the same way, 2-byte (Unicode) strings can be displayed using a single-byte (codepaged) font. All characters not defined in the font will then be replaced with spaces, text output still continues working and reponds with [ACK].

In the chapter Command Description, Unicode string parameters are always described as type "wstring" in the corresponding parameter tables.

Note

Syntax in iLCD Manager XE:

\iDUHello World!\0

When entering Unicode strings in iLCD Manager XE, all characters as well as decimal or hex values are interpreted as words (2 bytes). So a \0 translates to 0x0000, \r to 0x000D and also \5, \d5 or \x5 will be filled to 0x0005.

Note that Unicode strings are not indicating missing character glyphs as codepage strings do. The sequence for the above example would look like this:

AAH·D·U·00H·H·00H·e·00H·l·00H·l·00H·o·00H·20H·00H·W·00H·o·00H·r·00H·l·00H·d·00H·!·00H·00H

Graphic, Font, Macro and Message Names

Commands using graphic, font, macro or message indices can alternatively be addressed by a unique name for the according element. In this case - instead of the expected index - 0xFFFE has to be sent, followed by the element's name as a 0-terminated ASCII string comprised of a maximum of 32 characters.

In iLCD Manager XE, the sequence \m inserts the name index (0xFFFE).

In the chapter Command Description, a name parameter replacing an index is always described as type "by_name" in the corresponding parameter tables.

Syntax in iLCD Manager XE:

\iAF\mTahoma 10pt\0

The sequence for this example would look like this:

AAH·A·F·FFH·FEH·T·a·h·o·m·a·20H·1·0·p·t·00H

MicroSD Paths and Filenames

Paths and filenames on the on-board MicroSD card have to be named with DOS filenames in 8.3 format in order to be accessible.

When using filenames instead of indices, 0xFFFF followed by the complete path to the according file has to be sent.

In iLCD Manager XE, the sequence \f inserts the filename index (0xFFFF).

In the chapter Command Description, filename parameters are described as type "file" in the corresponding parameter tables. A filename parameter replacing an index however is described as "by_file".

Syntax in iLCD Manager XE:

\iG\fPath/Backgr~1.rii\0

The sequence for this example would look like this:

AAH·G·FFH·FFH·P·a·t·h·/·B·a·c·k·g·r·~·1·.·r·i·i·00H