Closed ldlamarc closed 4 years ago
@ldlamarc Can your provide some more detail or scene, or an example I can run? I will try to implement it.
See previous comment, not sure if/how I can add more detail. In summary/spec:
Input: "\x00\x00\x01\x01\x65\xba\xcb\x59" Current Output (wrong): EFBBBF0000010165C2BAC38B59
Expected output: 0000010165bacb59
@ldlamarc Thanks for your feedback.
Because EasyQRCode default is to support text mode, some special characters in binary mode can cause encoding problem. Now I release a new verison 3.8.0, it is support binary(hex) data mode.
Change to binary mode:
binary: true, // Use binary data mode
With binary mode it works as expected for my use case. Thanks!
Done.
When I give "\x00\x00\x01\x01\x65\xba\xcb\x59" as input I would expect it to generate a QR code which outputs 0000010165bacb59 as Binary(HEX) (on a reader that supports binary qr codes. e.g. QRefine on iOs).
Got: EFBBBF0000010165C2BAC38B59
Changing line 74 to: this.parsedData.push(code) seems to fix it so I assume it is related to the utf-8 transforms.