yes, I agree ASCII is indeed 7 bit. I have to confess that since the
early eighties - at least where I've been working or at college - it has
been considered 8 bit with all those extra characters above $7F. But I
sit corrected. (I like pedantry!)
Do you mind if I use your feedback in the next issue please? Thanks (in
advance) if so.
On 02/10/2019 10:49, Marcel Kilgus via Ql-Users wrote:
Norman Dunbar via Ql-Users wrote:
In this issue there is an article by Tobias on the Q68, plus
exciting stuff about the UTF8 character set encoding and how it can
be used on the QL - or at least, how I can use it! Two world class
(ahem!) utilities are supplied to enable conversion from the QL to
UTF8 and back again. There's even, wait for it, a table of contents! ;)
As a pedantic ass I have to object so sentences like these:
"• The UK Pound symbol is character 96 ($60) on the QL, but in ASCII
it is character 163 ($A3)" (etc.)"
ASCII is, by definition, 7-bit, so it cannot contain a character with
the number 163. The tale of characters 128-255 is one fought in many
battles. Linux tended to be "ISO 8859-1" and later "ISO 8859-15"
before they adopted UTF-8, on Windows you will mostly find the
"Windows-1252" encoding. These are very similar, but differ when it
comes to the Euro sign for example (ISO 8859-1 is too old to have a
Euro sign and the others have adopted it in different places).
But, and that is the important thing, Unicode was made to unify them
all. And UTF-8 is a pretty darn cool invention, unfortunately it came
too late for Windows, which was a very early adopter of Unicode at a
time when everybody thought "65536 characters ought to be enough for
everyone!". So Windows started to used 16-bits for every character
("UCS-2" encoding), which makes coding somewhat weird, and then they
found out that 65536 characters are not enough after all, so now
Windows uses UTF-16, which is UTF-8's big brother, with sometimes 2
bytes per character and sometimes 4. What a mess. But when it comes to
data storage UTF-8 is the way to go these days, always!
For QPC I already implemented these translations 20 years ago when
copying text to/from the clipboard. But well done for bringing UTF-8
to the QL :-)
QL-Users Mailing List
Dunbar IT Consultants Ltd
27a Lidget Hill
Company Number: 05132767
QL-Users Mailing List