Package ilcd
Class Draw

Public Method writeASCIIText

static void writeASCIIText(String textString)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Range Description
textString Unicode symbols encoded in UTF8 text to be output

Writes a string to the current cursor position. Note that each byte of the string will be interpreted as ASCII code. The following example demonstrates the difference between this method and Draw.writeText(String).

     // UTF8 code for "∀" is 0xE2 0x88 0x80
     Draw.writeASCIIText("∀");      // prints 3 characters according to the definition in the current font for 0xE2, 0x88 and 0x80.   
     Draw.writeText("∀");           // prints "∀" if defined in the current font or SPACE

Note

Example

Non Unicode Font symbols with codes above 127 can be displayed using a char-array.

     Attribute.setFont("CP1252");
     
     char[] c = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
     String str = new String(c);
  
     // use ASCII Font with codepage CP1252
     Draw.writeASCIIText(str);

This will write "€€€€€€€€€€" to the screen (€ = 0x80 in CP1252).

See also:

Draw.writeText(String)
Draw.writeTextMessage(int)
Control.setCursorPosition(int, int)
Attribute.setFont(int)
Control.getUnicodeTextExtent(String)
ANSI Support
Attribute