Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Row, row, row your bits, gently down the stream...


computers / comp.sys.apple2 / Understanding ASCII encoding across platforms?

SubjectAuthor
* Understanding ASCII encoding across platforms?TRS-90
`* Understanding ASCII encoding across platforms?fadden
 +- Understanding ASCII encoding across platforms?TRS-90
 `* Understanding ASCII encoding across platforms?mmphosis
  `- Re: Understanding ASCII encoding across platforms?Colin Leroy-Mira

1
Understanding ASCII encoding across platforms?

<DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=6262&group=comp.sys.apple2#6262

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: matthewmpower@gmail.com (TRS-90)
Newsgroups: comp.sys.apple2
Subject: Understanding ASCII encoding across platforms?
Date: Wed, 06 Dec 2023 02:10:19 GMT
Organization: A noiseless patient Spider
Lines: 3
Message-ID: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Injection-Info: dont-email.me; posting-host="ad89e406cfd01545a74c4912fb84d410";
logging-data="509622"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B7XIbINNpup8odgmJ1kOkJX/LkRTMoBI="
User-Agent: SNAP v1.2.2 (GSOS 6.0.1 (65816))
Cancel-Lock: sha1:sZVg7+FQ4MdOQYB20ln5NhMzO7Q=
 by: TRS-90 - Wed, 6 Dec 2023 02:10 UTC

Could anyone help me understand a text file? Like the most basic that works on every system since the 1960s? I realize that might not be possible and that's why ASCII was invented. I've read about UTF-8 and there are certainly more since then. I honestly don't even know what encoding is used to make this message on an Apple IIgs readable on Usenet. Is ASCII the most platform-independent? On modern systems I use VSCode, but I find even that program adds characters that show up as ? marks if I send the file to a IIgs for example.

Thank you for reading.

Re: Understanding ASCII encoding across platforms?

<a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=6264&group=comp.sys.apple2#6264

  copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:ae9:f444:0:b0:77d:5f72:3c86 with SMTP id z4-20020ae9f444000000b0077d5f723c86mr14438qkl.1.1701883165719;
Wed, 06 Dec 2023 09:19:25 -0800 (PST)
X-Received: by 2002:a05:6830:1d96:b0:6d9:cae1:e805 with SMTP id
y22-20020a0568301d9600b006d9cae1e805mr475998oti.6.1701883165461; Wed, 06 Dec
2023 09:19:25 -0800 (PST)
Path: i2pn2.org!i2pn.org!nntp.comgw.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Wed, 6 Dec 2023 09:19:24 -0800 (PST)
In-Reply-To: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.130.68.111; posting-account=UAtoeQoAAADrX7T-MHdWWRC4Fzf0dsLP
NNTP-Posting-Host: 24.130.68.111
References: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>
Subject: Re: Understanding ASCII encoding across platforms?
From: thefadden@gmail.com (fadden)
Injection-Date: Wed, 06 Dec 2023 17:19:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1842
 by: fadden - Wed, 6 Dec 2023 17:19 UTC

On Tuesday, December 5, 2023 at 6:09:55 PM UTC-8, TRS-90 wrote:
> Could anyone help me understand a text file?

Run "iconv -l" to get a brief list of character encodings. (I see about 1100 on Ubuntu Linux.)

If you stick to ASCII, your text will be readable everywhere, but most non-English languages can't be represented with the ASCII character set. Modern systems use Unicode, often with UTF-8 encoding, which was designed so that ASCII text "just works".

The Apple IIgs uses a custom locale-specific character set, often Mac OS Roman. It is based on ASCII, but has additional characters for common Latin-derived languages, plus some math symbols.

Re: Understanding ASCII encoding across platforms?

<BLbmFKhlDPcqELcqDQit%matthewmpower@gmail.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=6267&group=comp.sys.apple2#6267

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: matthewmpower@gmail.com (TRS-90)
Newsgroups: comp.sys.apple2
Subject: Re: Understanding ASCII encoding across platforms?
Date: Thu, 07 Dec 2023 00:16:02 GMT
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <BLbmFKhlDPcqELcqDQit%matthewmpower@gmail.com>
References: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com> <a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Injection-Info: dont-email.me; posting-host="091c2836c39632dc109b1d4ded63025d";
logging-data="1030518"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XS2iuTcYipMsLnNVw7H2a9mblpNlHKCg="
User-Agent: SNAP v1.2.2 (GSOS 6.0.1 (65816))
Cancel-Lock: sha1:bsm+qNyIGwELNWeitCAI54V3RR4=
 by: TRS-90 - Thu, 7 Dec 2023 00:16 UTC

>"fadden" wrote:
> If you stick to ASCII, your text will be readable everywhere, but most
> non-English languages can't be represented with the ASCII character set.
> Modern systems use Unicode, often with UTF-8 encoding, which was
> designed so that ASCII text "just works".

Thank you, I've been re-typing historical articles from 1800s newspapers about the area I live in. Doing it on a IIgs. I didn't realize there are so many different encodings. Your reply was helpful.

Re: Understanding ASCII encoding across platforms?

<mmphosis-1701995521@macgui.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=6271&group=comp.sys.apple2#6271

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mmphosis@macgui.com (mmphosis)
Newsgroups: comp.sys.apple2
Subject: Re: Understanding ASCII encoding across platforms?
Date: Fri, 8 Dec 2023 00:32:02 -0000 (UTC)
Organization: Mac GUI
Lines: 26
Message-ID: <mmphosis-1701995521@macgui.com>
References: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com> <a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Dec 2023 00:32:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b225a38d61e98744f4d3eb149a390631";
logging-data="1543395"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cRbvx6V37q2ZJS55PY//R"
User-Agent: Mac GUI Usenet
Cancel-Lock: sha1:PN3+euyxak7ZNU64Dl/0kfqRI4o=
In-Reply-To: <a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>
 by: mmphosis - Fri, 8 Dec 2023 00:32 UTC

That iconv command is super helpful. Thank you!

My serial card is currently in slot 3 on the Apple II:

]IN#3
]0 get a$ : ? a$; : if a$ <> chr$(4) goto
]RUN

In the Terminal, on the Linux platform:

../mistral-7b-instruct-v0.1-Q4_K_M-main.llamafile --temp 0.7 -r '\n' -p
'Display the euro symbol.' | tee /dev/tty | iconv -f UTF-8 -t
ASCII//TRANSLIT | tr [:lower:] [:upper:] | tr '\n' '\r' > /dev/ttyUSB0

Display the euro symbol.
Answer: €

On the Apple II:

DISPLAY THE EURO SYMBOL.
ANSWER: EUR

Re: Understanding ASCII encoding across platforms?

<20240201223550.17ef0478@laptop-sigfox>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=6636&group=comp.sys.apple2#6636

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: colin@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2
Subject: Re: Understanding ASCII encoding across platforms?
Date: Thu, 1 Feb 2024 22:35:50 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <20240201223550.17ef0478@laptop-sigfox>
References: <DRftCRdpDTdrAPinDMdo%matthewmpower@gmail.com>
<a7f83730-bbad-414f-85e3-7040de31cc7fn@googlegroups.com>
<mmphosis-1701995521@macgui.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="cba2138e6e4c5228737bda7eb4f8b92d";
logging-data="2347502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182eAjFbfZXqezdXE22nqpPyv2ZGodCV1w="
Cancel-Lock: sha1:vPJH0zVbzOo952E0YOs/GybQH6E=
X-Newsreader: Claws Mail 3.19.1git30 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Thu, 1 Feb 2024 21:35 UTC

Hi,

>./mistral-7b-instruct-v0.1-Q4_K_M-main.llamafile --temp 0.7 -r '\n' -p
>'Display the euro symbol.' | tee /dev/tty | iconv -f UTF-8 -t
>ASCII//TRANSLIT | tr [:lower:] [:upper:] | tr '\n' '\r' > /dev/ttyUSB0
>
>Display the euro symbol.
>Answer: €
>
>
>On the Apple II:
>
>DISPLAY THE EURO SYMBOL.
>ANSWER: EUR

On a related note about iconv and Apple II,

1) For international Apple IIs, the charset are:
French: ISO646-FR1
Spanish: ISO646-ES
Italian: ISO646-IT
German: ISO646-DE

You can use iconv -f UTF-8 -t ISO646-FR1//TRANSLIT in the same manner.

2) By the way, glibc 2.39, released yesterday, contains a little patch
of mine that translits (some) emojis to ASCII:

root@a2proxy:~# echo "😉" | iconv -f UTF-8 -t ASCII//TRANSLIT
;-)

I wrote it so that my Mastodon client, which relies on a proxy for
network access, json parsing and charset change, could display common
emojis!
--
Colin
https://www.colino.net/

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor