QR-Code Scanner and \r\n in QR-Code #273
Replies: 9 comments 1 reply
-
maybe urlencode it! |
Beta Was this translation helpful? Give feedback.
-
No, does not work, I do not get \r\n in ${decodedText} :-(, I only get a space, there is no other character. Thank's for help again ! BR |
Beta Was this translation helpful? Give feedback.
-
base64 encode so... |
Beta Was this translation helpful? Give feedback.
-
Hi Robert, can you send me a example ?, I do not understand at the moment your message :-( Thanks a lot :-) !!! Oliver |
Beta Was this translation helpful? Give feedback.
-
before to create your qrcode, encode the data with urlencode or base64encode. |
Beta Was this translation helpful? Give feedback.
-
Hi Robert, thanks for your tip but ist does not work with encoding the qrcode before generating and decoding after scanning. The problem is that the qrcode generator need a sting like this "PART1 LINE1\r\nLINE2\r\nLINE3\r\nLINE4", the result is a qrcode which can read from every smartphone correct (iPhone etc.). If I scan the qrcode with html5-qrcode i get the result in ${decodedText}, so it is decodeed and I get the Text as "PART1 LINE1 LINE2 LINE3 LINE4" in the browser, on a smartphone I get the output as: So the Result is decodeed from html5-qrcode but there is no linefeed :-( Here is my code from html5-qrcode: <script src="/scripts/html5-qrcode-master/dist/html5-qrcode.min.js"></script> <script> function docReady(fn) { // see if DOM is already available if (document.readyState === "complete" || document.readyState === "interactive") { // call on next available tick setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }
Any idea ? |
Beta Was this translation helpful? Give feedback.
-
What about this: |
Beta Was this translation helpful? Give feedback.
-
Hi Pavel, I have done a test with your code, it does not work :-(. I think the problem is that For more help I say thanks :-)! |
Beta Was this translation helpful? Give feedback.
-
Hi Pavel, I fond somethink: there is a "Container" named "decodedResult" parallel to decodedText, I can read ${decodedResult.result.format.formatResult} and get the result "QR_CODE", now the question is what name for example !!!!! ${decodedResult.result.text.decodedText} I have to use get the Result-Text from the scan, at the moment I need to know the "feelds from the container "decodedResult". I hope you know what I meen? |
Beta Was this translation helpful? Give feedback.
-
Hi,
the QR-Code Scanner is greate !!! The only think what I am missing or not found is that the scanner can't interprete \r\n (Linefeed) in ${decodedText}. So for example a QR-Code with:
adb\r\nbcd will not view as
abc
def
it will viewed as
abc def
mayby you have a Idee ? ;-) :-)
BR
Oliver
Beta Was this translation helpful? Give feedback.
All reactions