[Oberon] Portings Texts.Mod to Oberon-7, my Artemis project

Michael Schierl schierlm at gmx.de
Sat Jun 19 13:39:55 CEST 2021

Hello Charles,

Charles Perkins wrote:
> Charles Perkins <chuck at kuracali.com wrote:

>>     Michael Shierl has provided some patches

Everyone writes my name wrong :-(

>>     <https://github.com/schierlm/Oberon2013Modifications/blob/master/UTF8Charset/UTF8Charset.patch>
>>     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;

     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.



More information about the Oberon mailing list