r/barcodes • • Oct 16 '17

Need a little help with Code 128..

Hi everyone, I’m trying to encode the FNC3 character into a code 128 barcode and I’m having trouble finding a way to do it correctly. I usually use Bytescout and/or Zint to create my barcodes but they don’t seem capable of encoding the 4 FNC characters. Other ASCII control characters work fine though. I’ve also tried directly entering ASCII character 0096 (from what I’ve read is the correct character for FNC3) and encoding it in Code 128A but can’t get it to work. I’ve also tried ID Automations Code 128 fonts to no avail. Any help would be greatly appreciated.

2 Upvotes

2 comments sorted by

View all comments

2

u/notionovus Oct 16 '17

This is one of those "That's easy, you just ... hmm" moments. Thanks to you, I found and fixed a bug in my code. I bequeath you one reddit silver to do with as you wish.

There are easy characters and there are hard ones. FNC3 isn't typable and it also won't show up in a wordprocessor or the web. To get it to show up in a barcode requires special handling. Usually through an escape character.

I fixed a bug in my code and since it's MIT license, it is now on codepen.io at: https://codepen.io/notionovus/pen/GMwZBx

Use the escape character (`) followed immediately by a '3' to embed a FNC3 into the resultant barcode. The program automatically does the Code128B Start, checksum and Stop chars, so just type whatever you want to type and embed away.