在哪里可以找到“参考条形码”来验证条形码库输出?

时间:2022-12-26 16:09:31

This question is not about 'best' barcode library recommendation, we use various products on different platforms, and need a simple way to verify if a given barcode is correct (according to its specification).

这个问题不是关于'最佳'条形码库推荐,我们在不同平台上使用各种产品,并且需要一种简单的方法来验证给定条形码是否正确(根据其规格)。

We have found cases where a barcode is rendered differently by different barcode libraries and free online barcode generators in the Internet. For example, a new release of a Delphi reporting library outputs non-numeric characters in Code128 as '0' or simply skips them in the text area. Before we do the migration, we want to check if these changes are caused by a broken implementation in the new library so we can report this as a bug to the author.

我们发现了条形码由不同的条形码库和互联网上的免费在线条形码生成器呈现的情况。例如,Delphi报告库的新版本将Code128中的非数字字符输出为“0”,或者只是在文本区域中跳过它们。在我们进行迁移之前,我们要检查这些更改是否是由新库中的实现中断引起的,因此我们可以将此作为错误报告给作者。

We mainly need Code128 and UCC/EAN-128 with A/B/C subcodes.

我们主要需要Code128和UCC / EAN-128与A / B / C子码。

Online resources I checked so far are:

我到目前为止检查的在线资源是:

They show different results too, for example in support for characters like comma or plus signs, at least in the human readable text.

它们也显示出不同的结果,例如支持逗号或加号等字符,至少在人类可读文本中。

2 个解决方案

#1


11  

For Code128 there isn't a single correct answer. If you use Code128-A you can get a different result than Code128-C. By result I mean how it looks. Take "803150" as an example. In Code128-A you'll need 6 characters (+ start, checksum, stop) to represent this number. Code128-C only consists of numbers, so you can compress two digits into one character. Hence you'll need only 3 characters (+ start, checksum, stop) to represent the same number. The barcodes will look different (A being longer in this case), but if you scan them both will give the correct number.

对于Code128,没有一个正确的答案。如果您使用Code128-A,您可以获得与Code128-C不同的结果。结果我的意思是它的外观。以“803150”为例。在Code128-A中,您需要6个字符(+ start,checksum,stop)来表示此数字。 Code128-C只包含数字,因此您可以将两位数字压缩成一个字符。因此,您只需要3个字符(+ start,checksum,stop)来表示相同的数字。条形码看起来会有所不同(在这种情况下A会更长),但如果扫描它们,则两者都会给出正确的数字。

Further, Code128 doesn't need to be just A, B or C. You can actually combine the different subsets. This is common for cases like "US123457890", where Code128-A or B is used on "US" and Code128-C is used on the remaining digits. This is sometime referred to as Code-128 Auto, or just Code-128. The result is a "compressed" barcode in terms of width. You could represent the same data with A/B but again that would give you a longer barcode.

此外,Code128不需要只是A,B或C.您实际上可以组合不同的子集。这对于诸如“US123457890”的情况是常见的,其中Code128-A或B用于“US”并且Code128-C用于剩余数字。这有时被称为Code-128 Auto,或者只是Code-128。结果是宽度方面的“压缩”条形码。您可以使用A / B表示相同的数据,但同样可以为您提供更长的条形码。

Take two online generators:

拿两个在线发电机:

I recommend the first one, where you can select between Auto/A/B/C. Here is an example image illustrating the differences:

我推荐第一个,您可以在Auto / A / B / C之间进行选择。以下是说明差异的示例图片:

alt text http://i41.tinypic.com/17bwh3.gif

替代文字http://i41.tinypic.com/17bwh3.gif

On IDAutomation, Auto is default while A is default on Barcodes-Inc. Both are correct, you just need to be careful what subset you have selected when comparing output. I also recommend a barcode reader for use in development to test the output. Also, see this page for a comparision of the different subsets with ASCII values. I also find grandzebu.net useful, which has a free Code128 font you can use as well.

在IDAutomation上,Auto是默认值,而A是Barcodes-Inc上的默认值。两者都是正确的,您只需要小心在比较输出时选择的子集。我还建议使用条形码阅读器进行开发以测试输出。另外,请参阅此页面以比较具有ASCII值的不同子集。我也发现grandzebu.net很有用,它有一个免费的Code128字体,你也可以使用。

It sounds like your Delphi library always use Code128-C, since it's only possible to represent numbers in this subset.

听起来你的Delphi库总是使用Code128-C,因为它只能代表这个子集中的数字。

#2


0  

Why not just scan them and see what comes back?

为什么不扫描它们,看看会有什么回来?

#1


11  

For Code128 there isn't a single correct answer. If you use Code128-A you can get a different result than Code128-C. By result I mean how it looks. Take "803150" as an example. In Code128-A you'll need 6 characters (+ start, checksum, stop) to represent this number. Code128-C only consists of numbers, so you can compress two digits into one character. Hence you'll need only 3 characters (+ start, checksum, stop) to represent the same number. The barcodes will look different (A being longer in this case), but if you scan them both will give the correct number.

对于Code128,没有一个正确的答案。如果您使用Code128-A,您可以获得与Code128-C不同的结果。结果我的意思是它的外观。以“803150”为例。在Code128-A中,您需要6个字符(+ start,checksum,stop)来表示此数字。 Code128-C只包含数字,因此您可以将两位数字压缩成一个字符。因此,您只需要3个字符(+ start,checksum,stop)来表示相同的数字。条形码看起来会有所不同(在这种情况下A会更长),但如果扫描它们,则两者都会给出正确的数字。

Further, Code128 doesn't need to be just A, B or C. You can actually combine the different subsets. This is common for cases like "US123457890", where Code128-A or B is used on "US" and Code128-C is used on the remaining digits. This is sometime referred to as Code-128 Auto, or just Code-128. The result is a "compressed" barcode in terms of width. You could represent the same data with A/B but again that would give you a longer barcode.

此外,Code128不需要只是A,B或C.您实际上可以组合不同的子集。这对于诸如“US123457890”的情况是常见的,其中Code128-A或B用于“US”并且Code128-C用于剩余数字。这有时被称为Code-128 Auto,或者只是Code-128。结果是宽度方面的“压缩”条形码。您可以使用A / B表示相同的数据,但同样可以为您提供更长的条形码。

Take two online generators:

拿两个在线发电机:

I recommend the first one, where you can select between Auto/A/B/C. Here is an example image illustrating the differences:

我推荐第一个,您可以在Auto / A / B / C之间进行选择。以下是说明差异的示例图片:

alt text http://i41.tinypic.com/17bwh3.gif

替代文字http://i41.tinypic.com/17bwh3.gif

On IDAutomation, Auto is default while A is default on Barcodes-Inc. Both are correct, you just need to be careful what subset you have selected when comparing output. I also recommend a barcode reader for use in development to test the output. Also, see this page for a comparision of the different subsets with ASCII values. I also find grandzebu.net useful, which has a free Code128 font you can use as well.

在IDAutomation上,Auto是默认值,而A是Barcodes-Inc上的默认值。两者都是正确的,您只需要小心在比较输出时选择的子集。我还建议使用条形码阅读器进行开发以测试输出。另外,请参阅此页面以比较具有ASCII值的不同子集。我也发现grandzebu.net很有用,它有一个免费的Code128字体,你也可以使用。

It sounds like your Delphi library always use Code128-C, since it's only possible to represent numbers in this subset.

听起来你的Delphi库总是使用Code128-C,因为它只能代表这个子集中的数字。

#2


0  

Why not just scan them and see what comes back?

为什么不扫描它们,看看会有什么回来?