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

Unicode (16-bit) character warning #39

Open
konstk1 opened this issue Jan 21, 2024 · 1 comment
Open

Unicode (16-bit) character warning #39

konstk1 opened this issue Jan 21, 2024 · 1 comment

Comments

@konstk1
Copy link

konstk1 commented Jan 21, 2024

Whenever a string includes a 16-bit Unicode character, the library keeps printing the warning below. The character is correctly displayed on the matrix screen. So this is more of an annoyance.

"" character not found for the 6x10 font.

I verified this is specific to 16-bit Unicode. I tried a string with \u{ff}, which works fine. Replacing that with \u{100} starts logging that message.

@konstk1
Copy link
Author

konstk1 commented Jan 21, 2024

After some quick research, the place that prints this message uses a for loop to iterate over characters of a string. However, this doesn't work with utf-16.

Here's what it looks like if you try to iterate over

  const string s = "0↑";

  for (auto c : s) {
    cout << uint_least32_t(c) << endl;
  }
-------
  48
  4294967266
  4294967174
  4294967185

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

1 participant