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

Charles Perkins 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...

Cheers,
Chuck

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 :-(
>
> >>     <
> 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:
>
>
> https://schierlm.github.io/OberonEmulator/emu.html?image=IntegratedOberonDiskImage
>
>
> 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.WriteLn(W);
>      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.
>
>
> Regards,
>
>
> Michael
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20210619/c0350507/attachment.html>


More information about the Oberon mailing list