您能推荐一些有关最不模糊的字母/数字的信息吗?

发布于 2024-07-26 00:23:38 字数 543 浏览 5 评论 0原文

我感兴趣的是生成短代码(最多 6 个字符),这些代码对于人类可读性来说是明确的:

即:2Z8B5S 将是一个非常糟糕的代码,因为 B 看起来很像 8,2 看起来很像 Z,等等。

一个好的代码比如说:AE37HT。

显然,我可以尝试自己解决这个问题,但我想看看是否有像美国宇航局或其他机构这样的人进行过任何研究。

如果您还有任何关于颜色、字体、大小和观看距离如何影响可读性的参考资料(我正在从大约 6 英尺的距离观看可能大约一英寸高的东西),那也会很有帮助。 在显示器上,也可能在印刷品上。

我找到了这套指南,但它没有任何经验结果,我可以将其转换为表格来生成代码:

http://www.usabilitysciences.com/usability-of-codes-passwords-numbers-and-letters/

I'm interested in generating short codes (up to 6 characters) which are unambiguous for human readability:

i.e.: 2Z8B5S would be a very bad code because B looks a lot like 8 and 2 looks a lot like Z, etc.

A good code would be something like: AE37HT, say.

Obviously, I could try to figure it out myself, but I was looking to see if there were any studies by people like NASA or whatever.

If you also have any references about how the readability is affected by color, typeface, size and distance from viewing (I'm looking at something potentially about an inch high from a distance of about 6 feet), that would be helpful as well. On the monitor or possibly in print, too.

I found this set of guidelines, but it doesn't have any empirical results which I could turn into a table to generate the codes:

http://www.usabilitysciences.com/usability-of-codes-passwords-numbers-and-letters/

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

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

发布评论

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

评论(5

顾忌 2024-08-02 00:23:39

如果您不想担心字体。 这是我列出的列表(不包括小写字母):

'0' can look like a 'O'
'1' can look like a 'l'
'2' can look like a 'Z'
'5' can look like a 'S'
'8' can look like a 'B'
'B' can look like a '8'
'I' can look like a '1'
'J' can look like a '1'
'L' can look like a '1'
'O' can look like a '0'
'S' can look like a '5'
'T' can look like a '1'
'Z' can look like a '2'

If you didn't want to worry about fonts. Here is a list I made up (excluding lower case letters):

'0' can look like a 'O'
'1' can look like a 'l'
'2' can look like a 'Z'
'5' can look like a 'S'
'8' can look like a 'B'
'B' can look like a '8'
'I' can look like a '1'
'J' can look like a '1'
'L' can look like a '1'
'O' can look like a '0'
'S' can look like a '5'
'T' can look like a '1'
'Z' can look like a '2'
以歌曲疗慰 2024-08-02 00:23:39

我同意里德的观点,你最好的解决方案是字体

如果您尝试消除不明确的数字,则会丢失 1(看起来像小写的 l)、8(大写的 B ) 和 0(大写或小写 O),这是可用数字字符的 30%。 好多啊。 您甚至可能会遇到 6 和大写 G 的问题。

因此,消除看起来相似的字母和数字确实会限制您的选择。

当然,即使是同一种字体,也有一些相似之处——零和大写 O 总是会给你带来问题。

新快递怎么样? 或者类似的东西。 衬线。 等距。

我最喜欢的字体示例之一是伊利诺伊州的名称。 只需尝试使用 Arial 在文本框中输入该内容即可。 在那里放三个 L:伊利诺伊州。 然后,尝试查看是否有 3 个 L。 并且,祝您好运,将插入点移动到正确的位置。 使用 Courier 类型的字体要容易得多:Illinois

StackOverflow 和其他显示代码的网站使用类似 Courier 的字体来显示代码是有原因的。 以及为什么 SO 和其他网站和软件(Apple)在数据输入字段(文本框、文本区域等)中使用类似 Courier 的字体。

I agree with Reed that your best solution will lie with font.

If you try to eliminate ambiguous numbers, you lose 1 (looks like lowercase l), 8 (capital B) and 0 (upper or lowercase O), which is 30% of the available numeric characters. That's a lot. You might even have issues with 6 and capital G.

So, eliminating similar-looking letters and numbers is really going to limit your choices.

Sure, even with a font, there are some similarities -- zero and capital O are always gonna give you problems.

How about Courier New? Or something similar. Serif. Mono-spaced.

One of my favorite font examples is the name of the state Illinois. Just try to type that in a textbox using Arial. Put three L's in there: Illlinois. Then, try to see that there are 3 L's. And, good luck moving the insertion point to the right spot. SO much easier in a Courier-type font: Illlinois.

There's a reason StackOverflow and other sites displaying code use a Courier-like font to display code. And why SO and other websites and software (Apple) use Courier-like fonts for data entry fields (textboxes, textareas like this.

七颜 2024-08-02 00:23:39

生成代码时采用回溯方法怎么样,在这种方法中,任何不符合一组规则的解决方案都会无效,例如彼此相邻的字符不具有相似的字符。 如果您可以识别所有不需要的字符对并将包含它们的任何解决方案标记为无效,我想这非常简单。

How about a backtracking approach at generating the codes, where you would invalidate any solution that doesn't fit a set of rules, like not having similarly-looking characters next to one another. If you can identify all the unwanted pairs of characters and flag as invalid any solutions that contain them, I guess it's pretty straitforward.

我家小可爱 2024-08-02 00:23:39

如果您可以选择,您也许可以通过更改字体来影响这一点。 例如,许多面向程序员的字体故意将零去掉,对 I、l 和 1 使用不同的形状等等。 我记得衬线字体通常也用于此目的。 我猜测 - 我无法支持这一点 - 这也是许多旧书用“文本数字”排版的原因,数字具有不同的高度,可以更好地随页面流动并且(据说)增加可读性。 (参见http://en.wikipedia.org/wiki/Text_figures - 是的,我是几乎是逐字引用。)

If you have the choice you might be able to influence this by changing fonts. For example, many programmer-oriented fonts deliberately slash the zero, use different shapes for I, l, and 1, and so on. As I remember it serif fonts are usually used for this purpose as well. I am guessing - I can't back this up - that it was also the reason that many older books are typeset with "text figures", numerals that are of varying heights which flow better with the page and (supposedly) increase readability. (See http://en.wikipedia.org/wiki/Text_figures - yes, I am almost quoting them verbatim.)

凉世弥音 2024-08-02 00:23:38

坦率地说,我认为这里最重要的因素是选择正确的字体。

如果您的目标纯粹是易​​读性,那么就需要选择一种最好的字体:

1)固定宽度。 对于挑选随机数字/字母,固定宽度有很大帮助,因为当您在字体上移动时,字距不会改变。

2) 使用具有单独 0/O 外观的字体 - 这肯定会让人们感到困惑。 寻找其他类似的字母/数字组合。 出于这个原因,有可能将 0/O 排除在外。

3) 选择带有细微衬线和粗细变化的字体。

有关易读性的一些准则,请参阅此页面

使用正确的字体,我认为您可以选择任何字母/数字组合并使其易于理解(除了可能的 0 和 O)。 我相信 8/B、5/S 和其他样本在正确的字体下会很清晰。

您可以考虑的另一件事是对字母使用一种颜色,对数字使用第二种颜色 - 这将为潜在不明确的数字/字母组合提供线索。 不过,我会将此作为一个微妙的提示,因为剧烈的颜色变化会引起人们对字母或数字的注意,这会损害整体的可读性。


阅读您对另一个答案的评论后进行编辑:

我只需要几千个代码,所以我不太担心域的大小

如果是这种情况,我建议保留整个数字集,并有选择地添加没有视觉(或听觉)的字母,如果您正在阅读这些)与数字的相似性。 使用 6 位数字,即使是数字,您也可以拥有比您需要的更多的代码可能性。 有选择地添加字母来帮助区分比尝试有选择地删除一些字母更容易。 我可能会坚持使用 1-9、A、Z、R、W 和其他与数字不匹配的字母。

Frankly, I think the most important factor here is choosing the correct font.

If your goal is purely legibility, it will be a matter of picking a font that's preferably:

1) Fixed width. For picking out random numbers/letters, fixed width helps tremendously, since the kerning isn't changing as you move across the font.

2) Use a font with separate 0/O looks - those definitely mess people up. Look for other letter/number combinations that are similar. Potentially, leave 0/O out of the mix just for this reason.

3) Choose a font with subtle serifs and weight changes.

For some guidelines on legibility, see this page.

With the right font, I think you could pick any letter/number combination and have it be understandable clearly (other than potentially 0 and O). I believe the 8/B, 5/S and other samples would be clear in the correct font.

The other thing you could consider would be to use one color for letters and a second for numbers - this would give clues to the potentially ambigous number/letter combinations. I'd make this a subtle cue, though, as having a drastic color change will draw attention to letters or numbers, which will hurt the overall readability.


Edit after reading your comment to another answer:

I only need a few thousand codes, so I'm not terribly worried about the size of the domain

If this is the case, I would recommend leaving the entire number set, and just selectively adding in letters that have no visual (or aural, if you're reading these) similarity to numbers. With 6 digits, even with numbers, you have more code possibilities than you need. Selectively adding in letters to help differentiate will be easier than trying to selectively remove some. I would probably stick to 1-9, A, Z, R, W, and other letters that don't match up with numbers.

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