Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Improve print / println for special character like umlauts #181

Open
bitboy85 opened this issue Aug 13, 2020 · 1 comment

Comments

@bitboy85
Copy link

  • Arduino board: Arduino Nano

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.10

Currently its not handy using special characters with the display print method.

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
//Works fine:
display.print("Hello World!");
//shows garbage
display.print("Ä Ü Ö ä ü ö ß");
// Is possible with
display.print("\224 \201 \204");  //Using octal ASCII
//or
display.print("\x94 \x81");  //Using hex ASCII
//or
display.write(0x94);

It would be very user friendly if umlauts in strings would be automatically converted by the library as it reads much better and is more easy to use.

@mzero
Copy link
Contributor

mzero commented Oct 31, 2020

Please see my extensive comment in #190
Adafruit_GFX (and by extension Adafruit_SSD1306) does bring characters with umlauts. The Issue is that you are using the wrong encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants