[Solved] Huge, but mainly empty array? aka define utf8 for Nokia 5510 LCD

Hi!

I'm trying to build message displayer - based on Nokia display.

I'm using library for PCD8544 by Carlos Rodrigues and i generally understand it including usage.

But, i would like to preview utf8 characters (Polish, for now, but i want to prepare software for more signs). I know that ino files are saved in utf8 so i want to stick with it.
I need array with information how to display a sign with PCD8544. Charset (for ASCII) looks like:

// The 7-bit ASCII character set...
const PROGMEM unsigned char charset[][5] = {
  { 0x00, 0x00, 0x00, 0x00, 0x00 },  // 20 space
  { 0x00, 0x00, 0x5f, 0x00, 0x00 },  // 21 !
  { 0x00, 0x07, 0x00, 0x07, 0x00 },  // 22 "
  { 0x14, 0x7f, 0x14, 0x7f, 0x14 },  // 23 #
  { 0x24, 0x2a, 0x7f, 0x2a, 0x12 },  // 24 $
  { 0x23, 0x13, 0x08, 0x64, 0x62 },  // 25 %
  { 0x36, 0x49, 0x55, 0x22, 0x50 },  // 26 &
  { 0x00, 0x05, 0x03, 0x00, 0x00 },  // 27 '
  { 0x00, 0x1c, 0x22, 0x41, 0x00 },  // 28 (
  { 0x00, 0x41, 0x22, 0x1c, 0x00 },  // 29 )
...
  { 0x1c, 0x20, 0x40, 0x20, 0x1c },  // 76 v
  { 0x3c, 0x40, 0x30, 0x40, 0x3c },  // 77 w
  { 0x44, 0x28, 0x10, 0x28, 0x44 },  // 78 x
  { 0x0c, 0x50, 0x50, 0x50, 0x3c },  // 79 y
  { 0x44, 0x64, 0x54, 0x4c, 0x44 },  // 7a z
  { 0x00, 0x08, 0x36, 0x41, 0x00 },  // 7b {
  { 0x00, 0x00, 0x7f, 0x00, 0x00 },  // 7c |
  { 0x00, 0x41, 0x36, 0x08, 0x00 },  // 7d }
  { 0x10, 0x08, 0x08, 0x10, 0x08 },  // 7e ~
  { 0x00, 0x00, 0x00, 0x00, 0x00 }   // 7f 
};

I belive that all i need is signs up to two bytes, eg. C4 85, C5 BC, C5 BA.

How to create such an array "smart way", so i can read 'bytes' for LCD by accessing array[char]?
Or any other smart way for displaying characters....

Regards!

http://carlos-rodrigues.com/pcd8544/

He is the man.........

Can you not use the ASCII value as the index to the array ?

Nick_Pyner:
http://carlos-rodrigues.com/pcd8544/

He is the man.........

Not the case, but thanks - very useful.

UKHeliBob:
Can you not use the ASCII value as the index to the array ?

Yes. I'm trying to create array something like

const PROGMEM byte utf8_charset[][7] = {
{utf8_first_byte, utf8_second_byte, utf8_third_byte, Bpcd_first_byte, ... Bpcd_fifth_byte},
{21, 5, 7, 0, 0, 0, 0, 0}
};

and so on and compare ith with chars from string. But i'm not sure if this is a good way....