zxing / zxing

ZXing ("Zebra Crossing") barcode scanning library for Java, Android
Apache License 2.0
32.68k stars 9.35k forks source link

Problem with URL encoded pipe #1597

Closed KristjanESPERANTO closed 1 year ago

KristjanESPERANTO commented 1 year ago

Barcode

Here is a barcode containing a URL with an encoded pipe (%7c). That's the URL: https://reiseauskunft.insa.de/hafas-res/vs_webapp_havag/index.html#!P%7CSQ!evaId%7C5177!start%7C1

When I scan the barcode, the pipe is already decoded. That should not happen. When I click on the URL, only the part up to the first pipe is passed to the browser: https://reiseauskunft.insa.de/hafas-res/vs_webapp_havag/index.html#!P.

Barcode_1

I use the Android app.

srowen commented 1 year ago

No, it's not encoded within the barcode. See https://zxing.org/w/decode?u=https%3A%2F%2Fci6.googleusercontent.com%2Fproxy%2Fzag1O72aKXAPTQh3qgs-3mU0iA0cNhqdg_coFHctdSYHREx9tKqzxOUYxPDCRox861_7rtIOls5dnGPDP_0T6wva3EvwBi7Cp9-4svRVOnYUZ94mBaBMfj93qD_df75uO1E8jaSD-5XPGm1VTsjkHRM8nGmEZb3r%3Ds0-d-e1-ft%23https%3A%2F%2Fuser-images.githubusercontent.com%2F35647502%2F219665305-07104596-8e38-4f33-bcb7-a9510817d1ae.png

Did you maybe pass the encoded URL to a web-based encoder in a URL? then it would have been unescaped before going in

KristjanESPERANTO commented 1 year ago

I got the URL with the encoded pipes from a friend who scanned it with an iPhone, he probably copied the URL from the browser and sent it to me.

So the URL in the QR code is wrong, it shouldn't contain any pipes.

Thanks for the quick clarification!