1//
2// Ascii.cpp
3//
4// Library: Foundation
5// Package: Core
6// Module: Ascii
7//
8// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/Ascii.h"
16
17
18namespace Poco {
19
20
21const int Ascii::CHARACTER_PROPERTIES[128] =
22{
23 /* 00 . */ ACP_CONTROL,
24 /* 01 . */ ACP_CONTROL,
25 /* 02 . */ ACP_CONTROL,
26 /* 03 . */ ACP_CONTROL,
27 /* 04 . */ ACP_CONTROL,
28 /* 05 . */ ACP_CONTROL,
29 /* 06 . */ ACP_CONTROL,
30 /* 07 . */ ACP_CONTROL,
31 /* 08 . */ ACP_CONTROL,
32 /* 09 . */ ACP_CONTROL | ACP_SPACE,
33 /* 0a . */ ACP_CONTROL | ACP_SPACE,
34 /* 0b . */ ACP_CONTROL | ACP_SPACE,
35 /* 0c . */ ACP_CONTROL | ACP_SPACE,
36 /* 0d . */ ACP_CONTROL | ACP_SPACE,
37 /* 0e . */ ACP_CONTROL,
38 /* 0f . */ ACP_CONTROL,
39 /* 10 . */ ACP_CONTROL,
40 /* 11 . */ ACP_CONTROL,
41 /* 12 . */ ACP_CONTROL,
42 /* 13 . */ ACP_CONTROL,
43 /* 14 . */ ACP_CONTROL,
44 /* 15 . */ ACP_CONTROL,
45 /* 16 . */ ACP_CONTROL,
46 /* 17 . */ ACP_CONTROL,
47 /* 18 . */ ACP_CONTROL,
48 /* 19 . */ ACP_CONTROL,
49 /* 1a . */ ACP_CONTROL,
50 /* 1b . */ ACP_CONTROL,
51 /* 1c . */ ACP_CONTROL,
52 /* 1d . */ ACP_CONTROL,
53 /* 1e . */ ACP_CONTROL,
54 /* 1f . */ ACP_CONTROL,
55 /* 20 */ ACP_SPACE | ACP_PRINT,
56 /* 21 ! */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
57 /* 22 " */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
58 /* 23 # */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
59 /* 24 $ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
60 /* 25 % */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
61 /* 26 & */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
62 /* 27 ' */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
63 /* 28 ( */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
64 /* 29 ) */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
65 /* 2a * */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
66 /* 2b + */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
67 /* 2c , */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
68 /* 2d - */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
69 /* 2e . */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
70 /* 2f / */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
71 /* 30 0 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
72 /* 31 1 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
73 /* 32 2 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
74 /* 33 3 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
75 /* 34 4 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
76 /* 35 5 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
77 /* 36 6 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
78 /* 37 7 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
79 /* 38 8 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
80 /* 39 9 */ ACP_DIGIT | ACP_HEXDIGIT | ACP_GRAPH | ACP_PRINT,
81 /* 3a : */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
82 /* 3b ; */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
83 /* 3c < */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
84 /* 3d = */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
85 /* 3e > */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
86 /* 3f ? */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
87 /* 40 @ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
88 /* 41 A */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
89 /* 42 B */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
90 /* 43 C */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
91 /* 44 D */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
92 /* 45 E */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
93 /* 46 F */ ACP_HEXDIGIT | ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
94 /* 47 G */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
95 /* 48 H */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
96 /* 49 I */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
97 /* 4a J */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
98 /* 4b K */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
99 /* 4c L */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
100 /* 4d M */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
101 /* 4e N */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
102 /* 4f O */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
103 /* 50 P */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
104 /* 51 Q */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
105 /* 52 R */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
106 /* 53 S */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
107 /* 54 T */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
108 /* 55 U */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
109 /* 56 V */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
110 /* 57 W */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
111 /* 58 X */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
112 /* 59 Y */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
113 /* 5a Z */ ACP_ALPHA | ACP_UPPER | ACP_GRAPH | ACP_PRINT,
114 /* 5b [ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
115 /* 5c \ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
116 /* 5d ] */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
117 /* 5e ^ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
118 /* 5f _ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
119 /* 60 ` */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
120 /* 61 a */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
121 /* 62 b */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
122 /* 63 c */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
123 /* 64 d */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
124 /* 65 e */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
125 /* 66 f */ ACP_HEXDIGIT | ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
126 /* 67 g */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
127 /* 68 h */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
128 /* 69 i */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
129 /* 6a j */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
130 /* 6b k */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
131 /* 6c l */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
132 /* 6d m */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
133 /* 6e n */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
134 /* 6f o */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
135 /* 70 p */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
136 /* 71 q */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
137 /* 72 r */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
138 /* 73 s */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
139 /* 74 t */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
140 /* 75 u */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
141 /* 76 v */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
142 /* 77 w */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
143 /* 78 x */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
144 /* 79 y */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
145 /* 7a z */ ACP_ALPHA | ACP_LOWER | ACP_GRAPH | ACP_PRINT,
146 /* 7b { */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
147 /* 7c | */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
148 /* 7d } */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
149 /* 7e ~ */ ACP_PUNCT | ACP_GRAPH | ACP_PRINT,
150 /* 7f . */ ACP_CONTROL
151};
152
153
154} // namespace Poco
155