Special characters UTF-8

Any one here knows hot to write a special character in the arduboy?

My line of code is:

arduboy.print(F(“7 años”));

The character ñ, a common character in the spanish language, its all messed up.

Thanks for the help ^^

arduboy.print(F("7 a\xA4os"));

The glcdfont used by the Arduboy and Arduboy2 libraries maps to the Windows Terminal Font codes.

To select a character that isn’t encoded properly by the editor, you can enter its hexadecimal value by using a backslash and x lead-in followed by the two hex digits for the character (green then red in the following chart).

For example, ñ is at position A4 so you enter \xA4

Note that you can’t enter the “eighth note” ♪ character at 0D this way because it will be interpreted as a “new line” (carriage return) command. Also, the “inverse white circle” ◙ character at 0A (line feed) will be ignored.

2 Likes

Oh, nice!

Thanks a lot!!

Suprised someone hasn’t made a game out of those characters between B0 and CF.

2 Likes

Unfortunately, it’s a 5 X 8 font with a 6th blank pixel between each character. This means the line drawing characters don’t touch horizontally.

It’s easier to use line drawing functions.

Of course … I remember making puzzle games on my Vic20 using those characters.