<div dir="ltr">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.<div><br></div><div>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...</div><div><br></div><div>Cheers,</div><div>Chuck</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 19, 2021 at 4:40 AM Michael Schierl <<a href="mailto:schierlm@gmx.de">schierlm@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hello Charles,<br>
<br>
<br>
Charles Perkins wrote:<br>
> Charles Perkins <<a href="mailto:chuck@kuracali.com" target="_blank">chuck@kuracali.com</a> wrote:<br>
<br>
>>     Michael Shierl has provided some patches<br>
<br>
Everyone writes my name wrong :-(<br>
<br>
>>     <<a href="https://github.com/schierlm/Oberon2013Modifications/blob/master/UTF8Charset/UTF8Charset.patch" rel="noreferrer" target="_blank">https://github.com/schierlm/Oberon2013Modifications/blob/master/UTF8Charset/UTF8Charset.patch</a>><br>
>>     to Oberon-O7 in support of utf8 and fonts with large numbers of<br>
>>     glyphs in them, which I adopted and wrote a technote about.<br>
><br>
> Granted, none of the source texts<br>
> actually used Unicode in any way... the Oberon-07 language has no<br>
> concept of characters wider than 8 bits. A unicode aware language, even<br>
> merely to support unicode glyphs in strings, would require an update to<br>
> the language report, in my opinion.<br>
<br>
It does work in Integrated Oberon:<br>
<br>
<a href="https://schierlm.github.io/OberonEmulator/emu.html?image=IntegratedOberonDiskImage" rel="noreferrer" target="_blank">https://schierlm.github.io/OberonEmulator/emu.html?image=IntegratedOberonDiskImage</a><br>
<br>
<br>
MODULE Esperanto;<br>
   IMPORT Texts, Oberon;<br>
<br>
   PROCEDURE Test*;<br>
     VAR W: Texts.Writer;<br>
   BEGIN Texts.OpenWriter(W);<br>
     Texts.WriteString(W, "Eĥoŝanĝo ĉiuĵaŭde");<br>
     Texts.WriteLn(W);<br>
     Texts.Append(Oberon.Log, W.buf)<br>
   END Test;<br>
END Esperanto.<br>
<br>
<br>
If you transfer this file to Oberon using (emulated) PCLink, compile it,<br>
and run it while using a Unicode capable font (e.g. Tahoma) in the Log<br>
viewer, the text appears just fine.<br>
<br>
The characters in memory are still 8 bits wide, using UTF-8 encoding.<br>
The "magic" happens when the string gets converted to a Texts.Text,<br>
which is Unicode aware.<br>
<br>
<br>
Regards,<br>
<br>
<br>
Michael<br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</blockquote></div>