SBASIC / SuperBASIC Reference Manual - HTML

Anything QL Software or Programming Related.
RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by RWAP »

Appendix 9 is the main issue with foreign characters - I doubt this can be improved at all automatically and will have to be hand edited to maybe create some tables..


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by tcat »

Dilwyn, Rich,

I think I may code the character conversion, at least I will try, but I need a help.
Could you please print for me, ESCP file characters from Appendix9, starting 127 (copyright) to 191 (down arrow)?
Appendix9 shows the shortcuts and indeed reveals some of the codes I need, but not all of them.

127copyright <??> <new line>
...
...
191 down arrow <??> <new line>

Many thanks.
Tom


User avatar
dilwyn
Mr QL
Posts: 3063
Joined: Wed Dec 01, 2010 10:39 pm

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by dilwyn »

tcat wrote:Dilwyn, Rich,

I think I may code the character conversion, at least I will try, but I need a help.
Could you please print for me, ESCP file characters from Appendix9, starting 127 (copyright) to 191 (down arrow)?
Appendix9 shows the shortcuts and indeed reveals some of the codes I need, but not all of them.

127copyright <??> <new line>
...
...
191 down arrow <??> <new line>

Many thanks.
Tom
Not sure if this is what you mean, here is a screen dump of the UK JS ROM, Minerva and SMSQE character sets displaying the characters. Sorry about the vertical distortion, that's QemuLator.
js_charset.png
minerva_charset.png
smsqe_charset.png


RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by RWAP »

I guess what is needed is more a print out from Text87 or a simple document containing the characters for chr$(0) to chr$(255) one after the other (no spaces between them) - so that tcat can see what Text87 outputs to the printer - remember the conversion program works on the ESC/P2 output so not necessarily the QL character codes.

From memory, that is why Appendix 9 uses the names of the characters because Text87 does not handle the odd characters very well.

Ideally the conversion would change these to the HTML equivalent characters which would have been shown on the QL screen -eg & would become & amp ; (no spaces) in the output.


RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by RWAP »

A suggested improvement to the automatic conversion program has just come to mind... :D

1) Generally a paragraph will end with a double br character, a h1, h2, h3 or span="font-style:italic" section.
This means that it should be possible to convert the paragraphs into HTML paragraphs.

2) Any br characters within a paragraph could then be removed - the exception to this is where the br characters appear within a h1, h2, h3 or span="font-style:italic" section, as this will be a program listing.

This may cause more problems but I think it will reduce the actual amount of hand editing required.....


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by tcat »

Dilwyn,

Thank you for your try.

I may really need a print out from Text87 or a simple document containing the characters for chr$(127) to chr$(191). Characters outside this range have no equivalent in latin1.

Ideally commented if possible.
127 copyright <??> <new line>
...
...
191 down arrow <??> <new line>

So far I have decoded these chars.

Code: Select all

ESC/P   LATIN1   COMMENT
$8e      $e4         # a umlaut
$83      $c0         # A grave
$90      $c9         # E acute
$8a      $c8         # E grave
$9c      $a3         # pound symbol
Many thanks
Tom


RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by RWAP »

I have sent a dump of characters 127 to 191 as printed via Text87 using the ESC/P2 drivers, so that should help.

In the meantime a couple of people have tidied up a couple of the introductory pages on the manual, and Appendix 16. :D

I know the header and the sidebar need some improvement to meet HTML standards - does anyone want to do this?


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by tcat »

Rich,

Here is the result of your dump. Unfortunately I cannot squeeze all characters into latin1, some codes overlaps and some have plain ascii meaning, so I picked those I felt most frequent. E.G. capital A grave I sucrificed to a circumflex. Arrow keys use control codes ESC,^Z,^X,^Y, so I do not map these for the time being.

Please see the result.
Not sure if this can be improved further with UTF8 encoding.

I am also sending next batch run to you. I realise some parts of the manual have been edited already so I hope this will mainly affect Appendices 8,9, Keywords K.

Tom
Characters 158-191
Characters 158-191
Characters 127-157
Characters 127-157


RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by RWAP »

The easiest way might be to encode them into the HTML entities rather than using Latin-1 - if you email me the relevant part of the conversion program, I will alter it to use HTML entities..

See http://www.utexas.edu/learn/html/spchar.html

This includes most (if not all) of the QL characters you need...


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: SBASIC / SuperBASIC Reference Manual - HTML

Post by tcat »

Rich,

I will be posting the code tomorrow, please bear with me, I am adding some comments, so you can easily follow.

Tom


Post Reply