zorantica / plsql-qr-code

Oracle PL/SQL Package and APEX plugin for QR Code Generation
MIT License
52 stars 20 forks source link

Some urls don't get the correct qr code #2

Closed brankosibalic closed 3 years ago

brankosibalic commented 3 years ago

HI,

I am having a problem with qr code generation. We use oracle 10g so I had to change two functions which are not supported, like the guy that had a problem with 11g in the issue mentioned before. It is working most of the time, but there is a problem with longer urls. The qr code is not readable or it is reading totally wrong ( some random numbers instead of url). Can you provide any help? I compared debug info from your demo site and my database and data is the same, but final message is not.

zorantica commented 3 years ago

Hi,

It seems like there is a problem with Your database encoding. QR codes are using UTF-8 encoded strings which are native for newer databases. If Your database is using different encoding You should use CONVERT function to change encoding of string, which is going to be encoded into QR code, to UTF8.

Please try to implement this and let me know if it works.

Best regards, Zoran

On Mon, Nov 30, 2020 at 11:30 AM brankosibalic notifications@github.com wrote:

HI,

I am having a problem with qr code generation. We use oracle 10g so I had to change two functions which are not supported, like the guy that had a problem with 11g in the issue mentioned before. It is working most of the time, but there is a problem with longer urls. The qr code is not readable or it is reading totally wrong ( some random numbers instead of url). Can you provide any help? I compared debug info from your demo site and my database and data is the same, but final message is not.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zorantica/plsql-qr-code/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIAUJSXU5LHQS3GASXWBBPLSSNX5BANCNFSM4UHL4HUQ .

brankosibalic commented 3 years ago

We are using utf-8. I tried with convert, and getting the same result. photo_2020-11-30_12-53-08

I am comparing debug data from your demo site, and everything is the same until final message is generated. The length is different at that point. Here is screenshot of debug compassion compare :

brankosibalic commented 3 years ago

I found what was causing this random problem. It was the function that converts integer to binary I had to replace with 10g supported version. It was returning null when 0 was passed in as parameter. I fixed it and now it is working as it should.

zorantica commented 3 years ago

Fantastic! Thanks for the tip!

Best regards, Zoran

On Mon, Nov 30, 2020 at 3:33 PM brankosibalic notifications@github.com wrote:

I found what was causing this random problem. It was the function that converts integer to binary I had to replace with 10g supported version. It was returning null when 0 was passed in as parameter. I fixed it and now it is working as it should.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zorantica/plsql-qr-code/issues/2#issuecomment-735821757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIAUJSTREJTGEGCVGZ3AGI3SSOULPANCNFSM4UHL4HUQ .