HTBasic Help
×
Menu
Index

Roman-8 Translation Program

 
An example program, HP2PC.BAS, is distributed with HTBasic that can be used to translate ASCII files (including program files saved in ASCII) from the Roman-8 character set to code page 850 or Latin-1. The program only translates characters that appear literally or in CHR$(xxx) statements, where "xxx" is a constant above 127. If a character is specified in any other way (for example, "CHR$(X+3)"), it is not translated. You will have to make those translations manually.
 
If any attribute control characters in the range CHR$(128) to CHR$(143) are seen, they are translated to the alternate range at CHR$(16) to CHR$(31) and you must add the following statement to make attribute characters be recognized in this new range:
 
CONTROL CRT,100;1
 
Several characters that exist in the Roman-8 character set are not found in code page 850 or Latin-1. When translating to code page 850, the characters in the range CHR$(144) to CHR$(160) are translated to CHR$(219), a rectangular block, to make them easy to spot and hand translate. When translating to Latin-1, the characters in the range CHR$(144) to CHR$(160) are unchanged and the Dutch guilder symbol "ƒ", CHR$(190), is translated to "*", CHR$(42), to make it easy to spot and hand translate. Other characters are translated to similar characters:
 
From Character
Roman 8
Grave accent
169
Circumflex
170
Tilde
172
Lira
175
Š
235
š
236
Ÿ
236
To Character
PC-850
Latin-1
96
96
^
94
94
~
 
 
126
£
156
163
S
83
83
s
115
115
Y
89
89
 
To translate to code page 437, specify code page 850. The only difference is the translation for CHR$(191), the "¢" symbol. It is translated to CHR$(189) which is correct for code page 850, but should be CHR$(155) for code page 437. This minor correction can then be done by hand.