Closed RyanLiuF closed 3 years ago
Is the missing slash after the http scheme in the 2nd URL intentional?
Using your code above results into the following QR Code
Decoding seems to be fine
But I use the wechat app to scan the image , the result is "http://127.0.0.1/file/economic/.pdf". Seems that the app makes mistake ??
I believe you are not allowed to put Unicode characters into URLs. You should UTF-8 encode them and then percent-encode them, like this: http://127.0.0.1/file/economic/%E7%8E%B0%E4%BB%A3%E6%96%B9%E6%B3%95.pdf
I am experiencing a similar issue with a Discord Bot URL:
https://discord.com/oauth2/authorize?client_id=123456&permissions=0&scope=bot%20applications.commands
I tried scanning with a full-fledged GUI scanner as well as another Python library, but none of them gave me a result. They couldn't even detect the QR Code in the image.
@johann-lau Please post a screenshot or picture of the QR Code that you are having problems with.
Also, it's not clear that your problem is related to this existing thread, which is about Chinese/Unicode characters in a URL.
If the url is 'http://127.0.0.1/file/economic/现代方法.pdf', then the scanned image data is 'http://127.0.0.1/file/economic/.pdf'. But if the url is 'http:/127.0.0.1/file/economic/现代方法.pdf', the result is OK. Please fixed it.