QRCode icon indicating copy to clipboard operation
QRCode copied to clipboard

Is it possible to add "carriage return" to Numeric mode?

Open electrosaeed opened this issue 1 year ago • 5 comments

Hi, Is it possible to add "carriage return" to Numeric mode? It seems it is not exist in ALPHANUMERIC too. So we should use Byte mode to have \r char.

electrosaeed avatar Mar 09 '24 09:03 electrosaeed

That's correct. The Numeric and Alphanumeric modes are (intentionally) highly constrained.

Sorry. :s

ricmoo avatar Mar 09 '24 09:03 ricmoo

Thanks, but is it possible for me to add them (\r\n) to one of the Numeric or Alphanumeric?

electrosaeed avatar Mar 09 '24 10:03 electrosaeed

No, it's a widely adopted standard. :)

If you add them, your QR code will be read incorrectly when scanned by any other QR scanning software...

ricmoo avatar Mar 09 '24 10:03 ricmoo

I believe your answer is correct, but because it is important for me I asked the chatGPT this question. this is the answer:

"In modes 1 (Numeric) and 2 (Alphanumeric) in QR code, you cannot directly insert a new line character. However, you can use ASCII code for the newline character, which is equivalent to 10, and include it as text in your input. For example, if you want to insert a new line after the number 100 in mode 1 (Numeric), you can use the ASCII code for the newline character, which is equivalent to 10, and include it as text in your input."

Do you think it is possible?

electrosaeed avatar Mar 09 '24 10:03 electrosaeed

I don't, but you can try. :)

Here is some info I found useful when implementing it:

ricmoo avatar Mar 09 '24 11:03 ricmoo