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

Wrong characters for Aztec decoder in Decoder.MIXED_TABLE #1

Conversation

alexanderpopko
Copy link
Collaborator

@alexanderpopko alexanderpopko commented Jun 27, 2024

As described in zxing-js#607 decoding Aztec codes in some cases gives wrong results, i.e., '\x01' / '\x02' / '\x03' / '\x04' / '\x05' / '\x06' / '\x07' / '\x0b' / '\x1b' / '\x1c' / '\x1d' / '\x1e' / '\x1f' / '\x7f' get decoded to '\\1' / '\\2' / '\\3' / '\\4' / '\\5' / '\\6' / '\\7' / '\\13' / '\\33' / '\\34' / '\\35' / '\\36' / '\\37' / '\\177'.

By applying this pull request the above mentioned characters should get correctly decoded.

The current array entries were probably adopted from the Java version of this library, where one may specify characters by their octal code points using a "\[0-9]" notation. Thus, e.g., "\13" in Java equals, e.g., String.fromCharCode(0o13) or '\x0b' in JavaScript.

@alexanderpopko alexanderpopko changed the title Wrong characters for Aztec decoder in Decoder.MIXED_TABLE Wrong characters for Aztec decoder in Decoder.MIXED_TABLE Jun 27, 2024
@alexanderpopko alexanderpopko merged commit 236a336 into master Jul 1, 2024
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

Successfully merging this pull request may close these issues.

1 participant