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

Test for Usable Characters #51

Open
Iainrach opened this issue Feb 6, 2023 · 0 comments
Open

Test for Usable Characters #51

Iainrach opened this issue Feb 6, 2023 · 0 comments

Comments

@Iainrach
Copy link

Iainrach commented Feb 6, 2023

Adafruit_framebuf.py on Line 567 line = struct.unpack("B", self._font.read(1))[0] randomly causing
struct.error: ('unpack requires a buffer of 1 byte')

from my code

LineBuf =(x.text.strip()[0:60])
pixel_framebuf.text(LineBuf, i, 4, 0x0000FF)

It appears the web text randomly contained Unicode Decimal 8217 RIGHT SINGLE QUOTATION MARK which I'm guessing is not part of font5x8.bin and thus generates the error? When I replace with Unicode Decimal 39 APOSTROPHE all is good.

Of course they look pretty identical so it was difficult to understand the problem.

Is it possible to include a check for Usable Characters ?

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