[Oberon] Portings Texts.Mod to Oberon-7, my Artemis project
chuck at kuracali.com
Sat Jun 19 22:38:23 CEST 2021
Michael, my apologies! And thanks for this simple example. This, and Jörg's
reminder that CHAR in Oberon is not necessarily a byte, reminds me that I
should always check my assumptions before posting.
Again I am astounded by the expressive simplicity of Oberon, both the
system and the language. I'll try to keep that in mind as I do terrible
things to it in my own projects...
On Sat, Jun 19, 2021 at 4:40 AM Michael Schierl <schierlm at gmx.de> wrote:
> Hello Charles,
> Charles Perkins wrote:
> > Charles Perkins <chuck at kuracali.com wrote:
> >> Michael Shierl has provided some patches
> Everyone writes my name wrong :-(
> >> <
> >> to Oberon-O7 in support of utf8 and fonts with large numbers of
> >> glyphs in them, which I adopted and wrote a technote about.
> > Granted, none of the source texts
> > actually used Unicode in any way... the Oberon-07 language has no
> > concept of characters wider than 8 bits. A unicode aware language, even
> > merely to support unicode glyphs in strings, would require an update to
> > the language report, in my opinion.
> It does work in Integrated Oberon:
> MODULE Esperanto;
> IMPORT Texts, Oberon;
> PROCEDURE Test*;
> VAR W: Texts.Writer;
> BEGIN Texts.OpenWriter(W);
> Texts.WriteString(W, "Eĥoŝanĝo ĉiuĵaŭde");
> Texts.Append(Oberon.Log, W.buf)
> END Test;
> END Esperanto.
> If you transfer this file to Oberon using (emulated) PCLink, compile it,
> and run it while using a Unicode capable font (e.g. Tahoma) in the Log
> viewer, the text appears just fine.
> The characters in memory are still 8 bits wide, using UTF-8 encoding.
> The "magic" happens when the string gets converted to a Texts.Text,
> which is Unicode aware.
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon