Android Question QR code generator fails with Cyrillic letter from time to time

Gandalf

Member
Licensed User
Longtime User
I'm using cross-platform QR code generator from this thread: https://www.b4x.com/android/forum/threads/b4x-qrgenerator-cross-platform-qr-code-generator.93092/
In most cases it works perfectly but sometime it fails with with Cyrillic symbols used in my encrypted codes. For example this string causes qr generator to crash on both B4A and B4J: MDC-W{3Ы?,К5,Б32П|1Ч5oбGoБqog
Removing "Ы" symbol helps in this case. However generator can encode this alone symbol without any problem and removing two other random symbols from problematic string also helps. So it is not this particular symbol causing crashes. Now I'm searching for workaround and using only Latin letters but it would be nice to have the generator working with any UTF-8 symbols...
 

Gandalf

Member
Licensed User
Longtime User
It is not related to the Cyrillic characters. There is a bug in the maximum size setting of 4-H version.

Line 39 should be:
B4X:
Dim V_4H As Boolean = Bytes.Length <= 34 'it was 36 by mitake

Will post an updated version.

Thanks! It works now. I will continue testing.
 
Upvote 0
Top