Automatically print custom chars on 16x2 LCD screen when appearing in string

Hi! I'm from Norway, and as many of you already know, we got three special characters in out alphabet; Æ, Ø and Å. I'm working on a project where I'm fetching weather data from a Norwegian website, and printing this on a 16x2 LCD. Sometimes the weather data contains one of our special characters, and the LCD screen just show some kind of Japanese letter where the special character should have been. Is it possible for the Arduino to find special characters in a text string, and automatically replace them with custom made characters on the LCD?

Depending on the LCD but I think the common Hitachi clones will store up to 8 custom chars and these are mapped to the bottom 8 ASCII numbers. In standard ASCII these are non-printable chars so it's not overwriting useable letters.

LCD.write('a'); //write a lower-case 'a'
LCD.write(1); //write custom char #1
LCD.print("custom char \1");

Nice! That's a great way to use custom characters! But is there a way the Arduino can detect special charaters, and convert it, like shown below?

String "This is a test æ ø å"

should automatically be converted to

String "This is a test \1 \2 \3"

where 1, 2 and 3 are custom created characters

It looks like the 'extended ASCII' codes for those three characters may be 0xE6, 0xF8, and 0xE5.

Your program should be able to search for those codes and substitute the ones you want.


Alternatively search for LCD displays that have a different (European) character ROM. Not as common but they do exist. I expect they will be more expensive than a simple software parse/substituter solution.