[M3devel] cm3 does not support Scan.LongInt

Elmar Stellnberger estellnb at elstel.org
Mon Dec 16 17:42:41 CET 2013

Am 16.12.13 16:00, schrieb Tony Hosking:
> Jumping in late to this whole conversation (please forgive any 
> confusion)...
> I hesitate to define ANY M3 builtin type in terms of C/C++ standards.
> Regarding WIDECHAR, realize that its definition, like CHAR, should be 
> in terms of an enumeration containing some (minimal) number of elements.
> The standard says that CHAR contains at least 256 elements.
> In M3 enumerations all have a direct mapping to INTEGER.
> So, I assume that WIDECHAR would be UTF-32, and TEXT could be encoded 
> as UTF-8.
> More radically, what current code will break if CHAR is expanded to 
> UTF-32?
> The language definition would allow that (there is nothing that says 
> BITSIZE(CHAR) == 8).
Well, if so I could rewrite some code to define as BITS 16 FOR WIDECHAR 
Perhaps that would be the way to go.
However as Rodney M. Bates has said current WIDECHAR is not BITS 16 for 
It uses LE encoding rather than host order encoding a fact which one 
could be quite
happy about when it comes to extend Trestle/X11 for widechar support. So 
even that
would fail when it came to interface with X11 (or otherwise one would 
have to maintain
two branches of code all the time; one that does byte swapping and one 
that does not
depending on the host order AND the internally used wchar order which 
could then
differ as well.).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20131216/97c4229b/attachment-0002.html>

More information about the M3devel mailing list