pablohirafuji/elm-qrcode

Error when encoding alphanumeric string

Closed this issue · 5 comments

First of all this library is awesome, very impressive that you wrote all the low level stuff in Elm! I love being able to remove my javascript dependencies.

I'm trying to encode an alphanumeric string in order to get a more compact QR code, but I get the following error:

> QRCode.toSvg "5P13V7DW P3C9XRB5 DKX4JUTTX.W-1P5I:*CN3*ICC%:W2"
Err (LogTableException -233) : Result.Result QRCode.Error.Error (Html.Html msg)

> QRCode.toSvg "1GEDWRPXNX7$A7T9016.G*F2SA 0:*ED+OW520COPC4R*IL"
Err (LogTableException 1919488114)
    : Result.Result QRCode.Error.Error (Html.Html msg)

I have tried find a LogTableException error to make at least one test, but i couldn't, Thanks! I will take a look at the issue. Thanks for the feedback!

@pablohirafuji Sure! I did some more testing and it looks like it's a string length issue. When I try AAAAAAAAAAAAAA (14 chars) it works, but when I add another A it errors.

Nice, thanks for the information! I tested in 1.0.0 and works fine. I think I know where the bug was introduced,

@joshmh Published v1.0.2 with the fix. Let me know if it works!

Yay, it works! Thanks!