Talk:Code 128

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Information Density[edit]

what sort of information density can you get with code 128? Could I print 'War and Peace' on a single page? Funkyj 21:38, 15 December 2005 (UTC)

Not by a long way. If you wanted to do something like that, you'd go to a 2 dimensional barcode, and even then a reasonable target would be to get the text on a form onto a 2D barcode that occupied 1/3 of the form. For dense print like a novel (leaving aside whether W&P is denser than most) I think you'd get a less favourable ratio. Midgley 11:15, 26 April 2006 (UTC)

128b vs128c[edit]

What is the difference between 128b and 128c?

128B can print 0-9, A-Z, a-z and special characters. 128C can encode only numeric data. This restriction allows that two numbers can be encoded with one barcode symbol and reduce the barcode size. For instance, the barcode length of the number "1234" coded with 128B is twice the length of "1234" coded with 128C. One restriction of 128C is that it requires pairs of digits. (For example you could not encode "123". You would need to encode "0123" (or use some other padding mechanism). Another option to this problem is to encode "12" in 128C and then change to 128B for the "3". This increases the barcode size, but allows for higher density barcodes for numbers with an odd digit count.)

External links[edit]

I've added two links that are very useful for people that want to create their own codes, namely C routines for checksum calculation and the actual bit pattern (which in this format can't be found elsewhere on the net). Unfortunately someone keeps deleting those links. I'm reverting the page again. 17:28 BST 24. Oct. 2006

Please refer to the Talk:European Article Number page for the relevant discussion. --Millbrooky 16:52, 24 October 2006 (UTC)

Clarify a sentence.[edit]

This sentence needs clarifying: "One error in 2-5 million reads with a checksum using 6.6 wide (2 dots wide) using the 300 dpi printer on the thinnest line of the barcode" —Preceding unsigned comment added by (talk) 00:48, 18 April 2008 (UTC)

"Code 128 includes 101 symbols: 103 data symbols, 3 start codes, and 1 stop code." This sentence cannot be correct (the math simply doesnt add up, for positive integers a sum cannot be smaller than the biggest summand). I am not a barcode expert, but for the math to be valid it should be "Code 128 includes 107 symbols [...]". — Preceding unsigned comment added by (talk) 08:59, 4 August 2011 (UTC)

ISO/IEC 15417:2007[edit]

[1] Does ISO/IEC 15417:2007 further replace GS1-128? —Preceding unsigned comment added by Crammer101 (talkcontribs) 15:52, 2 June 2008 (UTC)

Optimal encoding[edit]

Finding the optimal Code 128 encoding of an input is not trivial. Perhaps a link to Dynamic programming would be in order?-- (talk) 19:44, 6 April 2009 (UTC)

Character set encoding[edit]

Looking for info about barcode readers able to understand the FNC4 special code, that allows the inclusion of character that are not included is ascii set, I haven't found anything That would need a citation reference of source.--Sucoplus (talk) 13:39, 23 May 2009 (UTC)


The article mentions Code 128 may be used for pallet and shipping labeling, but I am interested in how widespread, and what other uses this coding is used for. Is it exclusively for shipping, or is it more broadly used? —Preceding unsigned comment added by (talk) 21:14, 30 January 2011 (UTC)

Check digit[edit]

The article indicates, "if the check digit's value is lesser than 95 then the ASCII value is obtained by adding 32 to the check digit's value; else the ASCII value is obtained adding 105."

However, based on what I see in my documentation, the rule is: "if the check digit's value is lesser than 96 then the ASCII value is obtained by adding 32 to the check digit's value; else the ASCII value is obtained adding 65." — Preceding unsigned comment added by (talk) 15:27, 25 July 2011 (UTC) --- All of which is quite irrelevant as it has nothing to do with code128, merely how a given application would like to display the checkdigit (if at all). index values >96 would yield ANSI values 128 and beyond. I fail to see what relevance it is mentioning it in the main article. It might just as well discuss 'displaying' FNC_1 or start codes — Preceding unsigned comment added by (talk) 09:45, 7 March 2012 (UTC)

It looks to me as if the checksum in your US zip code example is wrong. The example lists [80] but my calculations yield [92] — Preceding unsigned comment added by (talk) 07:09, 20 December 2011 (UTC)

I've Also Calculated 92 For the check digit in the us zip coed Example. Here is my work

Value Weight Weight x Value
Start C 105 1 105
FNC1 102 1 102
42 42 2 84
18 18 3 54
40 40 4 160
20 20 5 100
50 50 6 300
Code A 101 7 707
0 16 8 128
Sum = 1740
1740 Mod 103 = 92

Illustrations different[edit]

The two illustrations on this page are both meant to show an encoded Wikipedia word, however the second image (the one with indicators showing the various parts) has the sequence "Start-B FNC1 Wikipedia", while the one at the top is "Start-B Wikipedia". This is slightly confusing if anyone tries to use the image to understand the encoding table, as the article text further down says the FNC1 will be followed by a numeric AI, which the example does not obey. Both barcodes scan fine though. Not sure if this is important, or what to do, but it wasnt clear for readers beyond a cursory review. — Preceding unsigned comment added by (talk) 01:55, 28 September 2011 (UTC)

The second example with the start sequence "Start-B FNC1 Wikipedia" is not a valid barcode. GS1-128 is a subset of Code 128 - agreed between GS1 and ISO/IEC-15417 where the start character is followed by FNC1, a numeric identifier and the data specified by the identifier. — Preceding unsigned comment added by (talk) 13:00, 26 May 2015 (UTC)

Code128 Auto[edit]

Besides A, B, C there is Code128 Auto. The explaination is "Automatically switch between the different code sets and performs characters optimization ". But how to do characters optimization? — Preceding unsigned comment added by (talk) 02:42, 22 November 2011 (UTC)

There's no such thing as 'Auto' as a definition for code128. It's probably just a gui dialog box's definition of automatically switching between sets (which for lower case is mandatory), versus that same dialog box 'accepting' a string of data as being already pre-encoded in 128.

'Character optimisation' is simply the detection of 4 or more digits being able to be compressed into bcd bytes. The switch in and out of codeC makes any less than that, pointless. — Preceding unsigned comment added by (talk) 09:36, 7 March 2012 (UTC)

If I encode "2012Wiki" using code 128B and code 128 Auto, the barcodes will have different shapes. Moreover, the 2 "Wikipedia" barcodes in this article also look different. Why?

Code 128 Auto allows for switching between different encodings for greater efficiency - in this case, by starting in Code C, the "2012" can be encoded with just two characters, whereas "2012" takes four in Code B. As for the differing Wikipedia barcodes, one of them appears to include an FNC 1 code before the W. — Preceding unsigned comment added by (talk) 15:22, 17 February 2014 (UTC)

Where to find the Font True Type?[edit]

Is there somewhere the original Font True Type (.ttf File) of Code 128 to download? — Preceding unsigned comment added by (talk) 15:57, 11 July 2012 (UTC)

Using fonts to create Code 128 barcodes[edit]

The "characters" column in the encoding table is IMHO a bit misleading, since the mapping of special codes 95-106 and 0 to characters is completely dependent on the font designer.
I know at least two fonts which use other mappings, and none which uses the mapping described here.

If I find the time I'll try a new paragraph on creating codes with fonts... (talk) 08:29, 29 November 2012 (UTC)

128 characters in ASCII?[edit]

"It can encode all 128 characters of ASCII"

Can it? The table only shows 107 code128 characters, from ASCII 32 (space) upwards. Before that it's all control codes, rather than actual "characters." (talk) 15:16, 17 February 2014 (UTC)

Never mind! The control codes are available in code 128A. — Preceding unsigned comment added by (talk) 15:18, 17 February 2014 (UTC)