What is ANSI encoding and what does it eat with?

Before answering the question about what is ANSI Windows encoding, we first answer another question: "What is encoding in general?"

Each computer, each system uses a certain set of characters, depending on the language used by the user, on his professional competencies and personal preferences.

General definition of encoding

So, in Russian, 33 characters are used to designate letters, in English - 26. Also 10 digits are used for counting (0; 1; 2; 3; 4; 5; 6; 7; 8; 9) and some special characters, in including comma, minus, space, period, percentage, and so on.

Each of these characters is assigned a serial number using the code table. For example, the letter "A" may be assigned the number 1; "Z" is 26 and so on.

Actually, a number representing a character as an integer is considered a character code, and the encoding is, accordingly, a set of characters in such a table.

A wealth of code table diversity

At the moment, there are a fairly large number of encodings and code tables used by different specialists: this is ASCII, developed in 1963 in America, and Windows-1251, most recently still popular thanks to Microsoft, KOI8-R and Guobiao - and many, many others, and the process of their appearance and death occurs to this day.

Among this huge list, the so-called ANSI encoding is absolutely special.

The fact is that at one time, Microsoft created a whole set of code pages:

Windows - 874Thai
Windows-1250Central European
Windows-1251Cyrillic (all characters of the Russian language + characters of related languages)
Windows-1252Western European
Windows-1253Greek
Windows-1254Turkish
Windows-1255Jewish
Windows-1256Arab
Windows 1257Baltic
Windows-1258Vietnamese

All of them received the general name of the ANSI encoding table, or ANSI code page.

An interesting fact: one of the first code tables was ASCII, created in 1963 by the American National Standards Institute (ANSI), abbreviated as ANSI.

Among other things, this encoding also contains non-printed characters, the so-called "Escape Sequences", or ESC, unique to all symbol tables, often incompatible with each other. With skillful use, however, they allowed you to hide and restore the cursor, translate it from one position in the text to another, set tabs, erase the part of the terminal window in which you were working, change the formatting of the text on the screen and change the color (or even draw and serve sound signals!). In 1976, by the way, this was a pretty good help for programmers. By the way, a terminal is a device required for input and output of information. In those days, it was a monitor and keyboard connected to a computer (electronic computer).

Incorrect display of characters

Unfortunately, in the future, such a system caused numerous system crashes, displaying the so-called krakozyabry meaningless, unreadable character sets instead of the desired poems, news feeds, or descriptions of your favorite computer games. The appearance of these ubiquitous errors was caused only by an attempt to display the characters encoded in one code table using another.

encodings for example

Most often, we still encounter the consequences of incorrect reading of this encoding on the Internet, when for some reason our browser cannot accurately determine which of the Windows - **** encodings is currently in use, due to the indication of the web -master of general ANSI encoding or initially incorrect encoding, for example, 1252 instead of 1521. The exact encoding table is presented below.

Cyrillic ANSI Encoding Table, Windows-1251

No. P / p.

Hex

SYMBOL

No. P / p.

Hex

SYMBOL

No. P / p.

Hex

SYMBOL

000

00

Nop

086

56

V

171

Ab

"

001

01

SOH

087

57

W

172

AC

¬

002

02

STX

088

58

X

173

AD

003

03

ETX

089

59

Y

174

Ae

®

004

04

Eot

090

5A

Z

175

AF

Ї

005

05

ENQ

091

5B

[

176

B0

°

006

06

ACK

092

5C

\

177

B1

±

007

07

Bel

093

5D

]

178

B2

І

008

08

BS

094

5E

^

179

B3

і

009

09

Tab

095

5F

_

180

B4

ґ

010

0A

Lf

096

60

`

181

B5

µ

011

0B

VT

097

61

a

182

B6

012

0C

Ff

098

62

b

183

B7

·

013

0D

CR

099

63

c

184

B8

E

014

0E

SO

100

64

d

185

B9

No.

015

0F

SI

101

65

e

186

BA

Є

016

10

Dle

102

66

f

187

BB

"

017

eleven

DC1

103

67

g

188

BC

ј

018

12

DC2

104

68

h

189

Bd

Ѕ

019

thirteen

DC3

105

69

i

190

BE

Ѕ

020

14

DC4

106

6A

j

191

Bf

Ї

021

fifteen

Nak

107

6B

k

192

C0

A

022

16

SYN

108

6C

l

193

C1

B

023

17

ETB

109

6D

m

194

C2

IN

024

18

CAN

110

6E

n

195

C3

G

025

19

Em

111

6F

o

196

C4

D

026

1A

SUB

112

70

p

197

C5

E

027

1B

Esc

113

71

q

198

C6

F

028

1C

FS

114

72

r

199

C7

3

029

1D

GS

115

73

s

200

C8

AND

030

1E

RS

116

74

t

201

C9

Th

031

1F

US

117

75

u

202

CA

TO

032

20

Space

118

76

v

203

CB

L

033

21

!

119

77

w

204

CC

M

034

22

"

120

78

x

205

CD

N

035

23

#

121

79

y

206

CE

ABOUT

036

24

$

122

7A

z

207

CF

P

037

25

%

123

7B

{

208

D0

R

038

26

&

124

7C

|

209

D1

FROM

039

27

''

125

7D

}

210

D2

T

040

28

(

126

7E

~

211

D3

At

041

29th

)

127

7F

212

D4

F

042

2A

*

128

80

213

D5

X

043

2B

+

129

81

Ѓ

214

D6

Ts

044

2C

,

130

82

215

D7

H

045

2D

-

131

83

ѓ

216

D8

W

046

2E

.

132

84

217

D9

U

047

2F

/

133

85

...

218

DA

B

048

thirty

0

134

86

219

DB

S

049

31

1

135

87

220

DC

B

050

32

2

136

88

221

DD

E

051

33

3

137

89

222

DE

YU

052

34

4

138

8A

Љ

223

Df

I

053

35

5

139

8B

224

E0

a

054

36

6

140

8C

Њ

225

E1

b

055

37

7

141

8D

TO

226

E2

in

056

38

8

142

8E

Ћ

227

E3

g

057

39

9

143

8F

Џ

228

E4

d

058

3A

:

144

90

229

E5

e

059

3B

;

145

91

''

230

E6

well

060

3C

<

146

92

''

231

E7

s

061

3D

=

147

93

232

E8

and

062

3E

>

148

94

233

E9

th

063

3F

?

149

95

234

EA

to

064

40

@

150

96

-

235

EB

l

065

41

A

151

97

-

236

EC

m

066

42

B

152

98 ˜

237

ED

n

067

43

C

153

99

238

Ee

about

068

44

D

154

9A

љ

239

Ef

P

069

45

E

155

9B

240

F0

R

070

46

F

156

9C

њ

241

F1

from

071

47

G

157

9D

to

242

F2

t

072

48

H

158

9E

ћ

243

F3

at

073

49

I

159

9F

џ

244

F4

f

074

4A

J

160

A0

245

F5

x

075

4B

K

161

A1

Ў

246

F6

c

076

4C

L

162

A2

ў

247

F7

h

077

4D

M

163

A3

Ј

248

F8

w

078

4E

N

164

A4

¤

249

F9

u

079

4F

O

165

A5

Ґ

250

FA

b

080

fifty

P

166

A6

¦

251

Fb

s

081

51

Q

167

A7

§

252

FC

b

082

52

R

168

A8

E

253

Fd

uh

083

53

S

169

A9

©

254

FE

Yu

084

54

T

170

AA

Є

255

Ff

I

085

55

U

Moreover, in 1986 ANSI was significantly expanded, thanks to Ian E. Davis, who wrote The Draw package, which allows not only to use the basic, from our point of view, functions, but also to fully (or almost fully) draw!

To infinity and beyond!

To summarize

Thus, it can be seen that the ANSI encoding, in fact, although it was a rather controversial decision, retains its position.

what is encoding

Over time, from the easy hand of enthusiasts, the ancient ANSI terminal even migrated to telephones!

Source: https://habr.com/ru/post/C25446/


All Articles