为QR- code生成工具,不同意有关标准限制? [英] Tools for QR-Code generation, not agree about standard limits?

查看:259
本文介绍了为QR- code生成工具,不同意有关标准限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有由一个QR- code psented字符串$ P $(标准)的大小限制。典型的限制:

There are (standard) size limits for strings presented by a QR-Code. Typical limits:


  • QR- code的的译本 1-L -Alphanumeric 的: 25个字符

  • QR- code的的译本 1-M -Alphanumeric 的: 20个字符

  • QR-Code of Version-1-L-Alphanumeric: 25 characters.
  • QR-Code of Version-1-M-Alphanumeric: 20 characters.

和有 软件工具将一个字符串输入到相应的 QR- code符号的图片 的。这些工具必须尊重标准限值......但是当你测试的任何这些工具,他们不尊重......

and there are software tools that transforms a input string into a image of the corresponding QR-Code symbol. These tools MUST respect the standard limits... But when you test any of these tools, they not respect...

他们不同意关于ISO标准限值?有另一个ISO?有一个的错误的,或者非间$ p的 risck $ ptation符号时使用的最大大小的?

They not agree about ISO standard limits? There are "another ISO"? There are a bug, or a risck of non-interpretation of symbols when using maximum sizes?

在使用这个问题处理,我面临着一个新的问题:每个工具有大小限制了不同的选择该字符串中的每个 QR- code-版本

When dealing with this problem, I was faced with a new problem: each tool have a different choice for size limits in the string for each QR-Code-Version.

如果所有的 QR- code生成工具的cumply了QR- code标准ISO / IEC 18004:2006,表7 ,符号字符和输入数据容量的数量;由ISO标准规定的所有工具必须使符号。
例如:

If all QR-Code generator tool cumply the "QR-Code standard", ISO/IEC 18004:2006, Table 7, "Number of symbol characters and input data capacity"; all the tools MUST render symbols as stated by ISO standard. Examples:


  • 字符串 HTTP://BIT.LY/1234567890 有14个+ 10 = 24个字符,因此,24α25,最大的的字母数字模式 - 译本 1

  • string HTTP://BIT.LY/1234567890 have 14+10=24 characters, so, 24<25, the maximum for Alphanumeric Mode-L Version-1.


  • googleapis /图表/ QR 的:确定与<一个href=\"https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=HTTP://BIT.LY/123456789&chld=L|1\"相对=nofollow> 123456789 但失败,<一个href=\"https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=HTTP://BIT.LY/1234567890&chld=L|1\"相对=nofollow> 1234567890 。

api.qrserver 的:确定与<一个href=\"http://api.qrserver.com/v1/create-qr-$c$c/?data=HTTP%3A%2F%2FBIT.LY%2F1234567890&size=250x250\"相对=nofollow> 1234567890 (好!),但失败,<一个href=\"http://api.qrserver.com/v1/create-qr-$c$c/?data=HTTP%3A%2F%2FBIT.LY%2F12345678901234&size=250x250\"相对=nofollow> 12345678901234 - 因为有14 + 14 = 28个字符,因此,28> 25

api.qrserver: ok with 1234567890 (good!) but FAILS with 12345678901234 -- because have 14+14=28 characters, so, 28>25.

字符串 HTTP://BIT.LY/12345 有14个+ 5 = 19个字符,因此,19小于20,最大的的字母数字模式 - M 译本 1

string HTTP://BIT.LY/12345 have 14+5=19 characters, so, 19<20, the maximum for Alphanumeric Mode-M Version-1.


  • googleapis /图表/ QR 的:确定与<一个href=\"https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=HTTP://BIT.LY/1234&chld=M|1\"相对=nofollow> 1234 但失败,<一个href=\"https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=HTTP://BIT.LY/12345&chld=M|1\"相对=nofollow> 12345 。

api.qrserver 的:确定与<一个href=\"http://api.qrserver.com/v1/create-qr-$c$c/?data=HTTP%3A%2F%2FBIT.LY%2F1234&size=250x250&ecc=M\"相对=nofollow> 1234 (好!),同时还与<一个好href=\"http://api.qrserver.com/v1/create-qr-$c$c/?data=HTTP%3A%2F%2FBIT.LY%2F123456&size=250x250&ecc=M\"相对=nofollow> 123456 (仍然版-1),但失败,<一个href=\"http://api.qrserver.com/v1/create-qr-$c$c/?data=HTTP%3A%2F%2FBIT.LY%2F1234567&size=250x250&ecc=M\"相对=nofollow> 1234567 ,因为没有更改版本2时,有14个+ 7 = 21> 20个字符。

api.qrserver: ok with 1234 (good!), and good also with 123456 (remains Version-1), but fails with 1234567, because not changes to version-2 when have 14+7=21>20 characters.

...等,与其他许多QR- code发生器(前的 phpqr code 失败更多!)和版本-1的限制。

... and so on, with many other QR-Code generator (ex. phpqrcode fails more!) and Version-1 limits.

这是一个普遍的错误?或我的expections(有关标准符合性和QR- code发电机的行为)是错误的?

That is a generalized bug? Or my expections (about standard compliance and QR-Code Generators behaviour) are wrong?

PS:到现在为止,我的观点,也有缺乏(ISO)标准符合性的工具

PS: until now, for my point of view, there are a lack of (ISO) standard compliance in the tools.


  • QR- code生成工具的:任何在线或离线,软件工具,它生成一个字符串的QR- code,suppling作为输入字符串和一些参数(通常版,EPS,字符集和图像大小)。

  • QR-Code Generation Tool: any, online or offline, software tool that generate a QR-Code of a string, suppling as input the string and some parameters (typically version, EPS, charset and image size).

可编码字符集的:


  • 8位字节的数据(二进制的):一套完整的,UTF-8或ISO 8859-1字符集。的二进制的是工具的,通常默认的字符集与UTF8选项。

  • 8-bit byte data (binary): a complete set, UTF-8 or ISO 8859-1 charsets. Binary is the usual default charset of tools, with the UTF8 option.

字母的数据:一组ASCII的44个字符(数字 0-9 ;大写字母 AZ ;其他九个字: (空格), $ * + - / )。通常的工具没有这个选项,而是一个自动检测的行为,如果字符串为大写,字符集被设置好的字母数字。

alphanumeric data: a set of ASCII 44 characters (digits 0-9; upper case letters A-Z; nine other characters: (space), $ % * + - . / :). Usually tools not have this option, but a "auto-detected" behaviour, if the string is UPPER CASE, the charset is setted to alphanumeric.

ECL 的:在QR- code的纠错水平。 ECL-L(低)为7%,ECL-M(中)为15%。

ECL: Error Correction Level of the QR-Code. ECL-L (Low) is 7%, ECL-M (Medium) is 15%.

版本 1-L QR code符号的:21行和低(L)ECL的象征。当编码的字母的数据,连接codeD字符串的最大长度为25个字符。

Version 1-L QR Code symbol: a symbol with 21 rows and with low (L) ECL. When encoding Alphanumeric data, the maximum length of encoded string is 25 characters.

版本 1-M QR code符号的:21行和中等(M)ECL的象征。当编码的字母的数据,连接codeD字符串的最大长度为20个字符。

Version 1-M QR Code symbol: a symbol with 21 rows and with medium (M) ECL. When encoding Alphanumeric data, the maximum length of encoded string is 20 characters.

对于其他链接的 ISO标准表-7 的(副本和跨pretations):

Other links for ISO Standard Table-7 (copies and interpretations):

ISO / IEC 18004:2006年,只有目录和副本: http://raidenii.net/files /datasheets/misc/qr_$c$c.pdf

https://en.wikipedia.org/wiki/QR_$c $ C

推荐答案

有一个(没有​​过时)ISO规格的QR codeS,ISO 18004:2006。大多数时候,你看到什么就是不符合规定。但你缺少解释方差过于规范的一个小部分。

There is one (not obsolete) ISO spec for QR codes, ISO 18004:2006. Most of what you observe is just lack of compliance. But there is one small part of the spec you are missing that explains the variance too.

首先,为什么一些似乎为en code的版本和EC水平太少信息?只是一个错误。

First, why do some of these appear to encode too little info for a version and EC level? just a bug.

例如,谷歌的执行图表是相当老了,不能维持,德precated,我知道它有一些错误。这是在 HTTP为EN codeR的基础://$c$c.google .COM / p / zxing 于2008年,我知道我们很久以前的固定这样的事情。 zxing不会切换到下一个版本在测试中还为时过早。

For example, the Google Chart implementation is quite old, not maintained, deprecated, and I know it has a few bugs. It was the basis for the encoder in http://code.google.com/p/zxing in 2008, and I know we fixed something like this a long time ago. zxing will not switch to the next version "too early" in your tests.

那么,如何 api.qrserver 似乎得到的的信息到一个版本1 QR code?你俯瞰,你可以切换模式在一个QR code,以进一步节省字节。该发电机切换到数字模式该结束的字符串,并最终足以仍然适合保存到第1版,EC级男,21字符的数字。

So how does api.qrserver appear to get too much info into a version 1 QR code? You're overlooking that you can switch modes in one QR code to further save bytes. This generator switch to numeric mode for the digits that end the string, and ends up saving enough to still fit into Version 1, EC level M, with 21 characters.

这是合法的,尽管不是必需的最优化。对于整个字符串选择字母数字模式是完全有效的了,但是在某些情况下,将不会产生最短的编码

This is legal, although the optimization is not required. Choosing alphanumeric mode for the entire string is perfectly valid too, but will not yield the shortest possible encoding in some cases.

这篇关于为QR- code生成工具,不同意有关标准限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆