kenglxn / QRGen

a simple QRCode generation api for java built on top ZXING
http://glxn.net/2012/03/10/qrgen-a-small-wrapper-on-top-of-zxing-for-generating-qrcodes-in-java
1.49k stars 299 forks source link

Update Url.java #98

Closed prasenjeetpaul closed 6 years ago

prasenjeetpaul commented 6 years ago

The Url is forced to upperCase() which is not correct. Some url may contain combination of both small and uppercase letters.

pawlidim commented 6 years ago

.... QR Codes can encode data more efficiently in some cases if only uppercase letters are used. That's because it has a special encoding mode for text consistent of only (uppercase) letters, numbers, and common symbols. It may be advantageous to encode a URL like HTTP://MYSITE.COM/FOO... rather than http://mysite.com/foo... for this reason.....

https://github.com/zxing/zxing/wiki/Barcode-Contents

prasenjeetpaul commented 6 years ago

But what if a link contains both uppercase and lower case letters E.g: goo.gl/abCDef1 , now this will be coded as GOO.GL/ABCDEF1 which will then lead to an invalid link!! That's the reason why i am concerned. @pawlidim

pawlidim commented 6 years ago

Ok!! You're right.

kenglxn commented 6 years ago

I agree, URLs should always be case sensistive. Although, you will need to fix the test case before this can be merged.

kenglxn commented 6 years ago

fix for #99

kenglxn commented 6 years ago

fixed in https://github.com/kenglxn/QRGen/pull/102