Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QR barcode carriage return

Tags:

qr-code

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)

like image 542
Mani5556 Avatar asked Oct 29 '25 04:10

Mani5556


1 Answers

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.

like image 71
Sean Owen Avatar answered Oct 31 '25 10:10

Sean Owen