Skip to content

Test for Usable Characters #51

Open
@Iainrach

Description

@Iainrach

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions