Skip to content

CLI tool does not use alphanumeric encoding on appropriate strings in some circumstances #228

@jkopczyn

Description

@jkopczyn

I have not fully investigated the circumstances where this happens, but I have a minimal pair of examples, below. In at least the case where a purely monocase alphanumeric string is given, with High error correction level set, the tool encodes it with 8-bit encoding rather than alphanumeric coding as it should, resulting in a significantly larger grid image than necessary.

This is probably not of significant impact in normal uses, but I'm using it to set up a puzzle where the alphanumeric version-6 33x33 grid rather than the 8bit version-8 41x41 would be significantly easier to fine-tune, and I need the high error correction level because I expect the fine-tuning to require corrupting the grid, possibly quite a lot. And it is, if I understand everything correctly, failing to correctly implement the QR Code encoding spec, which may matter in some other circumstances.

Examples:

$ qrencode -l H -i --verbose -o smaller.png "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP"
File: smaller.png, Version: 8
$ qrencode -l H -i --verbose -o smaller.png "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO"
File: smaller.png, Version: 7

I have personally verified that the resulting images are the sizes indicated and decode properly but can provide them if requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions