Skip to content

bug: QR Code version 7+ produces unscannable codes (writeVersionInfo bug) #85

@productdevbook

Description

@productdevbook

Summary

QR Code versions 7 and above produce codes that cannot be scanned. Versions 1-6 work correctly after the RS fix (bda9b20).

Details

Version 7+ requires an 18-bit version information block placed in two locations (bottom-left and top-right). The writeVersionInfo() function in src/encoders/qr/format.ts likely has incorrect bit placement.

Tested with jsQR round-trip:

  • V2-V6: OK (scannable)
  • V7-V10+: FAIL (unscannable)

The version info encoding or placement needs to be verified against ISO/IEC 18004 Table C.1.

Reproduction

import { encodeQR } from 'etiket';
const matrix = encodeQR('test', { version: 7 }); // produces unscannable code

References

  • ISO/IEC 18004 Section 7.10 (Version information)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstandardsIndustry standard compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions