Click here to Skip to main content
15,909,373 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Differences between .Net Framework and .Net Compact Framework ? Pin
led mike20-May-08 11:59
led mike20-May-08 11:59 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Ibuprofen20-May-08 19:39
Ibuprofen20-May-08 19:39 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Mike Dimmick21-May-08 1:23
Mike Dimmick21-May-08 1:23 
AnswerRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Mike Dimmick21-May-08 1:15
Mike Dimmick21-May-08 1:15 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Nelek21-May-08 7:15
protectorNelek21-May-08 7:15 
QuestionBarcode type recognision Pin
paper6720-May-08 7:56
paper6720-May-08 7:56 
AnswerCROSS POST Pin
leckey20-May-08 7:59
leckey20-May-08 7:59 
AnswerRe: Barcode type recognision Pin
Mike Dimmick21-May-08 3:10
Mike Dimmick21-May-08 3:10 
Barcode scanner hardware is generally able to read any barcode of a particular layout. 'One-dimensional' readers such as wands (which look like a pen you 'draw' along the length of the symbol) and lasers can generally read any one-dimensional code, that is, where the symbol consists of a sequence of parallel lines of varying thicknesses and spacing, and some can read two-dimensional codes which consist of a stack of one-dimensional codes, such as PDF or DataMatrix. The new Reduced Space Symbology, recently renamed DataBar, may be too new for some scanners - they may need a firmware upgrade.

Imagers, which simply take an image in the same way as a digital camera, can generally handle both 1D and 2D barcodes. They struggle if the barcode is very long, though, as the scanner needs to be placed a long way from the code to fit it all in to the image, and then the resolution of each line is not very good, making measurement of the bars and spaces difficult. Most methods of encoding - referred to as symbologies - are self-checking, meaning that the scanner just won't return anything, rather than returning incorrect data.

The different symbologies are designed for different purposes. For example, UPC and EAN are for encoding Global Trade Item Numbers, basically Stock Keeping Unit codes which identify a product in retail. That's their sole purpose and they shouldn't be used for anything else. If you're marking a product for sale by high-street retailers, you need a GTIN for your product, which means you need to register with your local GS1 Member Organization[^] to get a Company Prefix, a range of item numbers assigned to you. If you're in the US, this will be a UPC; if abroad, an EAN. In fact the two symbologies are the same thing, except that EAN changes the parity of some of the bars in the left-hand half of the code to encode the first digit. The original UPC parity scheme represents a '0' in EAN, the country code for the US in the GS1 system.

If your item is a book, it should have an ISBN (International Standard Book Number) and the barcode should be derived from that. A book barcode is an EAN, and traditionally started 978, then the first 9 digits of the ISBN (the tenth was a check character), then the EAN check digit. Because the 10-digit ISBN is close to being exhausted, new books are getting an 'ISBN-13' which is simply a GTIN; in future a new prefix will be issued if it hasn't been already. Magazines, newspapers and other periodicals start 977. Some books may have a 'supplemental' of five digits indicating the price or price code. Magazines often have a 2-digit supplemental indicating the issue number, so the base GTIN stays the same between issues and only the issue number is varied.

UPC E is simply a scheme for suppressing consecutive 0s in some UPC A barcodes to provide a shorter code. A UPC E code can (and in my view, should) be converted to the canonical GTIN representation when being read.

Retail products can also be marked with an EAN 8 barcode, which is a different number from the EAN 13 code. Some sources say that the EAN 8 code is a derivation but I believe this is incorrect.

For shipping containers of retail products, you should generally mark with Interleaved 2 of 5 (ITF) or GS1-128 (formerly called EAN-128). The former encodes two characters at a time, one with the lines, the other with the spaces (hence interleaved). Because of this it can only encode an even number of digits. ITF has a bug: the start and stop characters are underspecified, and some codes can be interpreted incorrectly if the scanner beam exits the top or bottom of the code (e.g. scanned obliquely). To prevent this, ITF is commonly used with thick black horizontal bars touching the top and bottom of the data bars.

GS1-128 is simply a Code 128 barcode with specific encoding rules to enable it to carry more than one piece of information. Those rules dictate the way that different pieces of data are encoded and delimited so that software can extract each piece of information. Couriers often use a subset of GS1-128 they call a 'license plate' for each package.

The airline industry I believe uses a special variant of ITF called IATA-2 of 5 which has different start and stop characters to avoid the partial decode problem.

Other symbologies are pretty generic and have certain properties which lend themselves to different purposes. As mentioned, Interleaved 2 of 5 can only encode numeric data but its length is bounded only by the practical limit of how wide the barcode can be. Code 39 encodes upper case Latin characters in addition to the numbers, plus a few symbol characters as well. There is also a standard extension to Code 39 called Full ASCII, where other characters from the ASCII set are encoded by escaping using the symbol characters; however, it is not possible to detect whether a barcode is intended to be Full ASCII or not. A variant of Code 39, Trioptic 39, uses different start and stop characters.

Code 39 has a small advantage in one way in that each character is encoded as a pattern starting and ending in a bar - the space between characters is not significant. This allows 'bar code fonts' to be used with word processors which might adjust this spacing, as long as the modules themselves are not distorted. Other symbologies such as Code 128 are continuous, that is they start with a bar and end with a space of a designated width.

Code 128 can encode the full ASCII character set. It does this not by having 128 distinct patterns but by having 'code sets' where the 103 different patterns have different meanings depending on which code set you're in. There are patterns reserved for shifting code sets, and three different start characters to indicate the code set used at the beginning. For a fully numeric barcode, Code 128 can be more compact by using Code Set C, where 100 of the patterns represent two digits, 00 to 99. (The remaining three are 'shift to Code A', 'shift to Code B', and 'FNC 1', a generic non-printable character that is used to indicate a GS1-128 code and delimit variable-length elements of a GS1-128 barcode).

Generally, if you're just encoding something for your own purposes I'd use Code 128, unless you want to take advantage of barcode fonts in which case Code 39 might be more appropriate.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: Barcode type recognision Pin
Pete O'Hanlon21-May-08 3:47
mvePete O'Hanlon21-May-08 3:47 
GeneralRe: Barcode type recognision Pin
Mike Dimmick21-May-08 6:58
Mike Dimmick21-May-08 6:58 
GeneralRe: Barcode type recognision Pin
Pete O'Hanlon21-May-08 8:53
mvePete O'Hanlon21-May-08 8:53 
GeneralRe: Barcode type recognision Pin
supercat924-May-08 8:19
supercat924-May-08 8:19 
AnswerRe: Barcode type recognision Pin
supercat924-May-08 8:08
supercat924-May-08 8:08 
Question.net framework and operating system issues Pin
kode_redd20-May-08 2:20
kode_redd20-May-08 2:20 
AnswerRe: .net framework and operating system issues Pin
Thomas Stockwell22-May-08 4:47
professionalThomas Stockwell22-May-08 4:47 
QuestionConsole.Beep Pin
PIEBALDconsult19-May-08 16:21
mvePIEBALDconsult19-May-08 16:21 
AnswerRe: Console.Beep Pin
Vasudevan Deepak Kumar19-May-08 18:02
Vasudevan Deepak Kumar19-May-08 18:02 
AnswerRe: Console.Beep Pin
Mike Dimmick20-May-08 4:34
Mike Dimmick20-May-08 4:34 
GeneralRe: Console.Beep Pin
Brady Kelly20-May-08 5:11
Brady Kelly20-May-08 5:11 
GeneralRe: Console.Beep Pin
PIEBALDconsult20-May-08 14:20
mvePIEBALDconsult20-May-08 14:20 
GeneralRe: Console.Beep Pin
PIEBALDconsult20-May-08 14:19
mvePIEBALDconsult20-May-08 14:19 
GeneralRe: Console.Beep Pin
supercat924-May-08 8:26
supercat924-May-08 8:26 
QuestionCan I in 3.5 add a property or method to a web control? Pin
Danny Weddle19-May-08 11:13
Danny Weddle19-May-08 11:13 
AnswerRe: Can I in 3.5 add a property or method to a web control? Pin
Steve Echols19-May-08 20:15
Steve Echols19-May-08 20:15 
AnswerRe: Can I in 3.5 add a property or method to a web control? Pin
leppie26-May-08 4:28
leppie26-May-08 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.