How do you encode a carriage return in a QR barcode (so if I scan it with my android, for instance it will come up)
A
B
C
I have tried A~d013B~d013C etc. but it always shows the escape characters (among other ways I have found, none of which seem to work)
You simply encode it by putting the correct byte sequence into the QR code. Assuming you're using the default ISO-8859-1 encoding, that's just the single byte 0x0D.
I imagine you know this so perhaps you are really asking how to specify this character/byte to some particular encoder? I can tell you that http://zxing.appspot.com/generator/ will easily let you do this in its "Text" mode as it gives you textarea to type into, where you can simply type a carriage return.
It in turn just generates a URL to the chart server:
http://zxing.org/w/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=a%0Ab%0Ac
Here it's actually inserted line feeds (is that what you mean?), but you could edit the URL above to insert %0D for a carriage return as you like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With