Closed pvarry closed 2 years ago
Hey @pvarry, just an update: I'm almost pinpointing what is the cause if the issue ^^
I think I'll be fixing the issues today or tomorrow!
@pvarry can you check if with v1.2.1
the issue is fixed? I've tested it with some phones and it seemed to be working. I could reproduce your reported case, and I've fixed the issues causing it.
I've also added a dataType
parameter to the QRCode
class constructor with which you can specify a data type for what you want to encode into the QRCode. By default it'll try to guess from the contents of the string, just like before :)
I tested the new release and it's work perfectly in my use case, I can use QRCode("123456").render()
with specific data type and it's correctly render QrCode.
dataType
work also great.
Thanks for the fix.
Describe the bug When a create a QrCode with only number, it's encode content as byte array and some very common tools can't display content.
To Reproduce
When I encode :
123456
-> the content is undetectable as String, only tools supporting byte decoding can display content123456b
-> the content detected by other tools is4R6T8VY
123456 gg
-> work correclyPS: I used https://zxing.org/w/decode.jspx to decode QrCode
Expected behavior
To generate a QrCode with correct String encoded and be able to decode it with most tools.
The solution can be to create a other constructor who can receive a Byte Array and use the current one only for String OR to add a parameter to specify input type.