Skip to content

Force encoding in dmtx #123

Description

@uidzip

Since swapping to dmtx, Barby::DataMatrix.new now autodetects the encoding to use and cannot be overridden. Semacode did not do numeric encoding so this wasn't a problem, but we have mail inserter equipment, 100s of $thousands, that cannot read numeric encoding datamatrix.

I will fork and do a PR unless someone beats me to it, but we need to be able to tell dmtx to use ascii encoding even if the data is numeric, through barby.

Activity

  1. uidzip commented on Dec 28, 2024

    @uidzip
    Author

    That actually isn't the problem, both are using ascii encoding. The more I dig into this the weirder it gets. Semacode used someone else's encoder function which had a one-off bug, and rather than fix it the semacode author just appended a space to the data, artificially increasing the symbol size. It also uses a lookup table to determine symbol size rather than calculate it efficiently the way dmtx does.

    What I actually need is a way to force dmtx to artificially use a less efficient symbol size than is required for the data. The inserters will read 18x18 but they will not read 14x14. I don't know why, I didn't build them and I can't force them to support 14x14. So I may have to do a PR on both barby and dmtx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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