MAINSAIL Language Manual, Appendix F

previous   next   top   contents   index   framed top   this page unframed


F. PDF Character Set Translation Tables

F.1. Translation between the ASCII and PDF Character Sets

The ASCII character set is used as the PDF character set. Thus, no character set translation is necessary on machines that use the ASCII character set, except possibly for
eol.

The PDF eol character is linefeed (LF, ASCII 10). Translation between the host eol character and the PDF eol character is done if the host eol character is not linefeed; the host linefeed character is also translated to the PDF eol in this case. When converting from PDF to the host character set, the PDF eol is always translated to the host eol.

A file converted from an ASCII host character set to PDF and back to the ASCII host character set thus remains unchanged only if the host eol is the PDF eol or the original file contained no host linefeed characters. For portable text files, therefore, avoid writing linefeed into an ASCII text file if linefeed is not the host eol character.

F.2. Translation between the EBCDIC and PDF Character Sets

Table F–1 shows how MAINSAIL translates characters from the PDF character set to the EBCDIC character set.

Table F–1. PDF to EBCDIC Character Set Translation Table

Char PDF EBCDIC
NUL 0 0
SOH 1 1
STX 2 2
ETX 3 3
EOT 4 55
ENQ 5 45
ACK 6 46
BEL 7 47
BS 8 22
HT 9 5
LF 10 37
VT 11 11
FF 12 12
CR 13 13
SO 14 14
SI 15 15
DLE 16 16
DC1 17 17
DC2 18 18
DC3 19 19
DC4 20 60
NAK 21 61
SYN 22 50
ETB 23 38
CAN 24 24
EM 25 25
SUB 26 63
ESC 27 39
FS 28 28
GS 29 29
RS 30 30
US 31 31
SPACE 32 64
! 33 90
" 34 127
# 35 123
$ 36 91
% 37 108
& 38 80
' 39 125
( 40 77
) 41 93
* 42 92

Char PDF EBCDIC
+ 43 78
, 44 107
- 45 96
. 46 75
/ 47 97
0 48 240
1 49 241
2 50 242
3 51 243
4 52 244
5 53 245
6 54 246
7 55 247
8 56 248
9 57 249
: 58 122
; 59 94
< 60 76
= 61 126
> 62 110
? 63 111
@ 64 124
A 65 193
B 66 194
C 67 195
D 68 196
E 69 197
F 70 198
G 71 199
H 72 200
I 73 201
J 74 209
K 75 210
L 76 211
M 77 212
N 78 213
O 79 214
P 80 215
Q 81 216
R 82 217
S 83 226
T 84 227
U 85 228

Char PDF EBCDIC
V 86 229
W 87 230
X 88 231
Y 89 232
Z 90 233
[ 91 173
\ 92 224
] 93 189
^ 94 95
_ 95 109
` 96 121
a 97 129
b 98 130
c 99 131
d 100 132
e 101 133
f 102 134
g 103 135
h 104 136
i 105 137
j 106 145
k 107 146
l 108 147
m 109 148
n 110 149
o 111 150
p 112 151
q 113 152
r 114 153
s 115 162
t 116 163
u 117 164
v 118 165
w 119 166
x 120 167
y 121 168
z 122 169
{ 123 192
| 124 106
} 125 208
~ 126 161
DEL 127 7
 

Table F–2 shows how MAINSAIL translates characters from the EBCDIC character set to the PDF character set. EBCDIC characters that have no corresponding ASCII equivalent translate to character code 0.

Table F–2. EBCDIC to PDF Character Set Translation Table

Char PDF EBCDIC
NUL 0 0
SOH 1 1
STX 2 2
ETX 3 3
PF 4 0
HT 5 9
LC 6 0
DEL 7 127
GE 8 0
RLF 9 0
SMM 10 0
VT 11 11
FF 12 12
CR 13 13
SO 14 14
SI 15 15
DLE 16 16
DC1 17 17
DC2 18 18
TM 19 19
RES 20 0
NL 21 0
BS 22 8
IL 23 0
CAN 24 24
EM 25 25
CC 26 0
CU1 27 0
IFS 28 28
IGS 29 29
IRS 30 30
IUS 31 31
DS 32 0
SOS 33 0
FS 34 0
  35 0
BYP 36 0
LF 37 10
ETB 38 23
ESC 39 27
  40 0
  41 0
SM 42 0

Char PDF EBCDIC
CU2 43 0
  44 0
ENQ 45 5
ACK 46 6
BEL 47 7
  48 0
  49 0
SYN 50 22
  51 0
PN 52 0
RS 53 0
UC 54 0
EOT 55 4
  56 0
  57 0
  58 0
CU3 59 0
DC4 60 20
NAK 61 21
  62 0
SUB 63 26
SPACE 64 32
  65 0
  66 0
  67 0
  68 0
  69 0
  70 0
  71 0
  72 0
  73 0
cent 74 0
. 75 46
< 76 60
( 77 40
+ 78 43
| 79 124
& 80 38
  81 0
  82 0
  83 0
  84 0
  85 0

Char PDF EBCDIC
  86 0
  87 0
  88 0
  89 0
! 90 33
$ 91 36
* 92 42
) 93 41
; 94 59
# ^ 95 94
- 96 45
/ 97 47
  98 0
  99 0
  100 0
  101 0
  102 0
  103 0
  104 0
  105 0
| 106 124
, 107 44
% 108 37
_ 109 95
> 110 62
? 111 63
  112 0
  113 0
  114 0
  115 0
  116 0
  117 0
  118 0
  119 0
  120 0
` 121 96
: 122 58
# 123 35
@ 124 64
' 125 39
= 126 61
" 127 34
 

Char PDF EBCDIC
  128 0
a 129 97
b 130 98
c 131 99
d 132 100
e 133 101
f 134 102
g 135 103
h 136 104
i 137 105
  138 0
  139 0
  140 0
  141 0
  142 0
  143 0
  144 0
j 145 106
k 146 107
l 147 108
m 148 109
n 149 110
o 150 111
p 151 112
q 152 113
r 153 114
  154 0
  155 0
  156 0
  157 0
  158 0
  159 0
  160 0
~ 161 126
s 162 115
t 163 116
u 164 117
v 165 118
w 166 119
x 167 120
y 168 121
z 169 122
  170 0

Char PDF EBCDIC
  171 0
  172 0
[ 173 91
  174 0
  175 0
  176 0
  177 0
  178 0
  179 0
  180 0
  181 0
  182 0
  183 0
  184 0
  185 0
  186 0
  187 0
  188 0
] 189 93
  190 0
  191 0
{ 192 123
A 193 65
B 194 66
C 195 67
D 196 68
E 197 69
F 198 70
G 199 71
H 200 72
I 201 73
  202 0
  203 0
  204 0
  205 0
  206 0
  207 0
} 208 125
J 209 74
K 210 75
L 211 76
M 212 77
N 213 78

Char PDF EBCDIC
O 214 79
P 215 80
Q 216 81
R 217 82
  218 0
  219 0
  220 0
  221 0
  222 0
  223 0
\ 224 92
  225 0
S 226 83
T 227 84
U 228 85
V 229 86
W 230 87
X 231 88
Y 232 89
Z 233 90
  234 0
  235 0
  236 0
  237 0
  238 0
  239 0
0 240 48
1 241 49
2 242 50
3 243 51
4 244 52
5 245 53
6 246 54
7 247 55
8 248 56
9 249 57
| 250 0
  251 0
  252 0
  253 0
  254 0
EO 255 0
 


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Appendix F