EBCDIC(英語:Extended Binary Coded Decimal Interchange Code,擴增二进式十进交換碼),为IBM於1963年-1964年间推出的字元编码表,根据早期打孔机式的BCDIC即一种二进化十进数(BCD,Binary Coded Decimal)信息交换编码改进而成。是IBM迷尔級以上電腦的標準碼。
它的缺点是:英文字母不是连续地排列,中间出现多次断续,为撰写程式的人带来了一些困难。
字符对应
EBCDIC编码表,最初定义了(不计空白字符在内的)88个可打印字符,同时还定义了减去26个小写字母后的62个可打印字符的子集[1]:
EBCDIC
|
|
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
A
|
B
|
C
|
D
|
E
|
F
|
0x
|
NUL
|
SOH
|
STX
|
ETX
|
SEL
|
HT
|
RNL
|
DEL
|
GE
|
SPS
|
RPT
|
VT
|
FF
|
CR
|
SO
|
SI
|
1x
|
DLE
|
DC1
|
DC2
|
DC3
|
RES/ ENP
|
NL
|
BS
|
POC
|
CAN
|
EM
|
UBS
|
CU1
|
IFS
|
IGS
|
IRS
|
IUS/ ITB
|
2x
|
DS
|
SOS
|
FS
|
WUS
|
BYP/ INP
|
LF
|
ETB
|
ESC
|
SA
|
SFE
|
SM/ SW
|
CSP
|
MFA
|
ENQ
|
ACK
|
BEL
|
3x
|
|
|
SYN
|
IR
|
PP
|
TRN
|
NBS
|
EOT
|
SBS
|
IT
|
RFF
|
CU3
|
DC4
|
NAK
|
|
SUB
|
4x
|
SP
|
|
|
|
|
|
|
|
|
|
¢
|
.
|
<
|
(
|
+
|
|
|
5x
|
&
|
|
|
|
|
|
|
|
|
|
!
|
$
|
*
|
)
|
;
|
¬
|
6x
|
-
|
/
|
|
|
|
|
|
|
|
|
|
,
|
%
|
_
|
>
|
?
|
7x
|
|
|
|
|
|
|
|
|
|
|
:
|
#
|
@
|
'
|
=
|
"
|
8x
|
|
a
|
b
|
c
|
d
|
e
|
f
|
g
|
h
|
i
|
|
|
|
|
|
|
9x
|
|
j
|
k
|
l
|
m
|
n
|
o
|
p
|
q
|
r
|
|
|
|
|
|
|
Ax
|
|
|
s
|
t
|
u
|
v
|
w
|
x
|
y
|
z
|
|
|
|
|
|
|
Bx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cx
|
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
|
|
|
|
|
|
Dx
|
|
J
|
K
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
|
|
|
|
|
|
Ex
|
|
|
S
|
T
|
U
|
V
|
W
|
X
|
Y
|
Z
|
|
|
|
|
|
|
Fx
|
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
|
|
|
|
|
EO
|
在打孔卡上的一行1964年EBCDIC字符
|
|
__________________________________________________________________
/ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#,$.-@%*<-/+_)¢|&>:;¬'?"=!(,.
12| ▊▊▊▊▊▊▊▊▊ ▊ ▊ ▊ ▊▊▊ ▊ ▊
11| ▊▊▊▊▊▊▊▊▊ ▊ ▊ ▊ ▊ ▊ ▊▊ ▊
0| ▊ ▊▊▊▊▊▊▊▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
1| ▊ ▊ ▊ ▊
2| ▊ ▊ ▊ ▊ ▊ ▊ ▊
3| ▊ ▊ ▊ ▊ ▊▊▊▊ ▊▊
4| ▊ ▊ ▊ ▊ ▊▊▊▊
5| ▊ ▊ ▊ ▊ ▊▊ ▊ ▊
6| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
7| ▊ ▊ ▊ ▊ ▊ ▊ ▊▊
8| ▊ ▊ ▊ ▊ ▊▊▊▊ ▊▊▊▊ ▊▊▊▊▊ ▊▊▊▊▊▊▊▊▊▊▊▊
9| ▊ ▊ ▊ ▊
|___________________________________________________________________
|
在打孔卡上顺序列出的1964年EBCDIC的62个字符
|
_______________________________________________________________
/ &-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/:#@'="¢.<(+|!$*);¬,%_>?
12| ▊ ▊▊▊▊▊▊▊▊▊ ▊▊▊▊▊▊
11| ▊ ▊▊▊▊▊▊▊▊▊ ▊▊▊▊▊▊
0| ▊ ▊▊▊▊▊▊▊▊▊ ▊▊▊▊▊
1| ▊ ▊ ▊ ▊
2| ▊ ▊ ▊ ▊ ▊ ▊ ▊
3| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
4| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
5| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
6| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
7| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
8| ▊ ▊ ▊ ▊ ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊
9| ▊ ▊ ▊ ▊
|________________________________________________________________
|
_______________________________________________________________
/ 123456789:#@'="0/STUVWXYZ,%_>?-JKLMNOPQR!$*);¬&ABCDEFGHI¢.<(+|
12| ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊
11| ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊
0| ▊▊▊▊▊▊▊▊▊▊▊▊▊▊▊
1| ▊ ▊ ▊ ▊
2| ▊ ▊ ▊ ▊ ▊ ▊ ▊
3| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
4| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
5| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
6| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
7| ▊ ▊ ▊ ▊ ▊ ▊ ▊ ▊
8| ▊ ▊▊▊▊▊▊ ▊ ▊▊▊▊▊ ▊ ▊▊▊▊▊▊ ▊ ▊▊▊▊▊▊
9| ▊ ▊ ▊ ▊
|________________________________________________________________
|
在处理ASCII可打印字符之时,将其[
占位¢
,其]
占位!
,其!
占位(表示逻辑或的)|
,而其^
占位(表示逻辑非的)¬
,并补充上所缺少的属于ASCII的6个标点符号,成为(不计空白字符在内的)94个可打印字符的编码表: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
|
X
|
Y
|
Z
|
|
|
|
|
|
|
Fx
|
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
|
|
|
|
|
EO
|
在后来代码页版本的EBCDIC中,定义了“不变子集”58个字符,即在62个可打印字符子集基础上再去掉4个被占用了字符,并且计空白字符而不计$
在内,如下图灰色底所示。然后于各版本的编码表中,加入了其他字符,以符合各地使用者所需。
以下是其中两个版本的EBCDIC编码表:CP037(英语)及CP500(多语言#5)。CP037为ASCII的[
、]
和^
重新指定了位置不再占用EBCDIC的¢
、!
和¬
,将其!
认同为原来EBCDIC的!
。CP500为被占用的EBCDIC的¢
、|
和¬
重新指定了位置,将EBCDIC的!
认同为占用了其位置的!
。
EBCDIC CP037
|
|
x0 |
x1 |
x2 |
x3 |
x4 |
x5 |
x6 |
x7 |
x8 |
x9 |
xA |
xB |
xC |
xD |
xE |
xF
|
0x
|
NUL |
SOH |
STX |
ETX |
ST |
HT |
SSA |
DEL |
EPA |
RI |
SS2 |
VT |
FF |
CR |
SO |
SI
|
1x
|
DLE |
DC1 |
DC2 |
DC3 |
OSC |
NEL |
BS |
ESA |
CAN |
EM |
PU2 |
SS3 |
FS |
GS |
RS |
US
|
2x
|
PAD |
HOP |
BPH |
NBH |
IND |
LF |
ETB |
ESC |
HTS |
HTJ |
VTS |
PLD |
PLU |
ENQ |
ACK |
BEL
|
3x
|
DCS |
PU1 |
SYN |
STS |
CCH |
MW |
SPA |
EOT |
SOS |
SGCI |
SCI |
CSI |
DC4 |
NAK |
PM |
SUB
|
4x
|
SP |
NBSP |
â |
ä |
à |
á |
ã |
å |
ç |
ñ |
¢ |
. |
< |
( |
+ |
|
|
5x
|
& |
é |
ê |
ë |
è |
í |
î |
ï |
ì |
ß |
! |
$ |
* |
) |
; |
¬
|
6x
|
- |
/ |
 |
Ä |
À |
Á |
à |
Å |
Ç |
Ñ |
¦ |
, |
% |
_ |
> |
?
|
7x
|
ø |
É |
Ê |
Ë |
È |
Í |
Î |
Ï |
Ì |
` |
: |
# |
@ |
' |
= |
"
|
8x
|
Ø |
a |
b |
c |
d |
e |
f |
g |
h |
i |
« |
» |
ð |
ý |
þ |
±
|
9x
|
° |
j |
k |
l |
m |
n |
o |
p |
q |
r |
ª |
º |
æ |
¸ |
Æ |
¤
|
Ax
|
µ |
~ |
s |
t |
u |
v |
w |
x |
y |
z |
¡ |
¿ |
Ð |
Ý |
Þ |
®
|
Bx
|
^ |
£ |
¥ |
· |
© |
§ |
¶ |
¼ |
½ |
¾ |
[ |
] |
¯ |
¨ |
´ |
×
|
Cx
|
{ |
A |
B |
C |
D |
E |
F |
G |
H |
I |
SHY |
ô |
ö |
ò |
ó |
õ
|
Dx
|
} |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
¹ |
û |
ü |
ù |
ú |
ÿ
|
Ex
|
\ |
÷ |
S |
T |
U |
V |
W |
X |
Y |
Z |
² |
Ô |
Ö |
Ò |
Ó |
Õ
|
Fx
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
³ |
Û |
Ü |
Ù |
Ú |
APC
|
EBCDIC CP500
|
|
x0 |
x1 |
x2 |
x3 |
x4 |
x5 |
x6 |
x7 |
x8 |
x9 |
xA |
xB |
xC |
xD |
xE |
xF
|
0x
|
NUL |
SOH |
STX |
ETX |
ST |
HT |
SSA |
DEL |
EPA |
RI |
SS2 |
VT |
FF |
CR |
SO |
SI
|
1x
|
DLE |
DC1 |
DC2 |
DC3 |
OSC |
NEL |
BS |
ESA |
CAN |
EM |
PU2 |
SS3 |
FS |
GS |
RS |
US
|
2x
|
PAD |
HOP |
BPH |
NBH |
IND |
LF |
ETB |
ESC |
HTS |
HTJ |
VTS |
PLD |
PLU |
ENQ |
ACK |
BEL
|
3x
|
DCS |
PU1 |
SYN |
STS |
CCH |
MW |
SPA |
EOT |
SOS |
SGCI |
SCI |
CSI |
DC4 |
NAK |
PM |
SUB
|
4x
|
SP |
NBSP |
â |
ä |
à |
á |
ã |
å |
ç |
ñ |
[ |
. |
< |
( |
+ |
!
|
5x
|
& |
é |
ê |
ë |
è |
í |
î |
ï |
ì |
ß |
] |
$ |
* |
) |
; |
^
|
6x
|
- |
/ |
 |
Ä |
À |
Á |
à |
Å |
Ç |
Ñ |
¦ |
, |
% |
_ |
> |
?
|
7x
|
ø |
É |
Ê |
Ë |
È |
Í |
Î |
Ï |
Ì |
` |
: |
# |
@ |
' |
= |
"
|
8x
|
Ø |
a |
b |
c |
d |
e |
f |
g |
h |
i |
« |
» |
ð |
ý |
þ |
±
|
9x
|
° |
j |
k |
l |
m |
n |
o |
p |
q |
r |
ª |
º |
æ |
¸ |
Æ |
¤
|
Ax
|
µ |
~ |
s |
t |
u |
v |
w |
x |
y |
z |
¡ |
¿ |
Ð |
Ý |
Þ |
®
|
Bx
|
¢ |
£ |
¥ |
· |
© |
§ |
¶ |
¼ |
½ |
¾ |
¬ |
| |
¯ |
¨ |
´ |
×
|
Cx
|
{ |
A |
B |
C |
D |
E |
F |
G |
H |
I |
SHY |
ô |
ö |
ò |
ó |
õ
|
Dx
|
} |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
¹ |
û |
ü |
ù |
ú |
ÿ
|
Ex
|
\ |
÷ |
S |
T |
U |
V |
W |
X |
Y |
Z |
² |
Ô |
Ö |
Ò |
Ó |
Õ
|
Fx
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
³ |
Û |
Ü |
Ù |
Ú |
APC
|
於编码表中,0x00 - 0x3F及0xFF为控制字元,0x40为空格,0x41为不换行空格(no-break space),0xCA为选择性连字号(soft hyphen)。
参见
外部链接
- ^ Mackenzie, Charles E. Coded Character Sets, History and Development (PDF). The Systems Programming Series 1. Addison-Wesley Publishing Company, Inc. 1980 [2022-04-06]. ISBN 0-201-14460-3. LCCN 77-90165.