为什么在ASCII表中大写字母先于小写字母? [英] Why do upper case letters come before lower case letters in the ASCII table?

查看:173
本文介绍了为什么在ASCII表中大写字母先于小写字母?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的一次采访中,面试官问我,为什么大写字母在ASCII表的小写字母之前,我在google.com上进行了搜索,但没有找到任何答案,有人可以给我答案吗?非常感谢!

In one of my interview, the interviewer asked me why the upper case letters are before the lower case letters in ASCII table, I searched on google.com but found nothing, could anyone gave me the answer? Thx a lot!

推荐答案

我只是在猜测,但是我想这是因为最早的字符集根本没有小写字母. Baudot电报代码只有5位,而CDC主机本机使用6位代码.没有小写的余地.当ASCII被开发为7位代码,最终为小写字母留出足够的空间时,它们被认为是一种奢侈的附加组件,因此将它们放在集合的后半部分是有意义的.

I'm only guessing, but I imagine it's because the earliest character sets had no lowercase at all. The Baudot telegraph code was only 5 bits, and CDC mainframes natively used a 6-bit code; there was no room for lowercase. When ASCII was developed as a 7-bit code which finally had enough room for lowercase letters, they were considered something of a luxury add-on, so it made sense to put them in the back half of the set.

但是值得注意的是,该顺序 是特定于ASCII的,其他字符集不一定正确;例如,EBCDIC首先使用小写字母. Commodore微型计算机可以在两个字符集之间切换,即使这两个字符集都是基于ASCII的,但具有小写字母的字符集都首先使用它们. (另一组中有多余的图形字符代替小写.)

But it's worth noting that this ordering is specific to ASCII, and not necessarily true of other character sets; for example, EBCDIC has the lowercase letters first. Commodore microcomputers could switch between two character sets, and even though both were based on ASCII, the one with lowercase letters had them first. (The other set had extra graphic characters in place of lowercase.)

Unicode是从ASCII(以及基于它的扩展拉丁字符集)中汲取灵感的,因此,大多数具有区分大小写的字母的大写版本都首先出现在其代码块中.但是也有例外,当然许多其他字母根本没有大小写区别,而其他字母的关系比我们简单的一对一映射更复杂.

Unicode has taken its cue from ASCII (and the extended-Latin character sets based on it), so most of the alphabets that have case distinctions have the uppercase versions come first within their code blocks. But there are exceptions, and of course many other alphabets don't have case distinctions at all, while others have more complicated relationships than our simple 1-to-1 mapping.

这篇关于为什么在ASCII表中大写字母先于小写字母?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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