当一维条码 128 仅包含一个字符时,Zxing 无法解码它

发布于 2024-12-21 08:40:57 字数 349 浏览 2 评论 0原文

当我将一个字符编码为一维代码 128 条形码(即“F”或“M”)时,Zxing 不会对其进行解码。我首先在我自己的应用程序中发现了这个问题,我集成了 zxing 源代码。 然后我还检查了原始的 Zxing 独立应用程序,只是为了确保这不是我的集成问题,而且标准 Zxing 应用程序也不会解码 1 个字符长度的条形码。

例如:

在此处输入图像描述

不起作用。

但如果条形码中的编码字符串长度为两个或更多字符,即“AB”、“FF”或“MM”,则它可以正常工作。为什么它不能使用 1 个字符长度? ZXing 中的错误?

When I encode one character as a 1D code 128 barcode, i.e. 'F' or 'M', Zxing doesn't decode it. I first found this issue in my own app where I integrated the zxing source code.
Then I checked the original Zxing standalone app as well, just to make sure it wasn't an issue with my integration, but also the standard Zxing app does not decode barcodes of 1 character length.

For example:

enter image description here

doesn't work.

But if the encoded string in the barcode is two or more characters long, i.e. 'AB', 'FF' or 'MM' it works fine. Why does it not work with 1 character length? A bug in zxing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

音盲 2024-12-28 08:40:58

这是过去为减少误报而内置于代码中的限制。根据您的错误,发现它不再需要,并已在当前 svn 头中删除。

It was a limitation built into the code in the past to reduce false positives. Based on your bug, it's been found to be no longer necessary and has been removed in the current svn head.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文