I am trying to find a
suitable way to approach both file and console I/O for my UNICODE
library, and I am concerned that - especially regarding console
I/O - I may have to write some sort of external C module which
would be accessed by FFI in some manner, which would act as a
wrapper around the wchar_t functions and handle the transitions to
and from the Unicode character types.
This is concerning, as I would rather find a native Modula-2
solution if possible, but in this instance I don't see a way to do
so. Most of the existing I/O operations for numbers auto-convert
the values into numeric text strings; the only exception to this
is the ISO RawIO and SRawIO libraries.
Unfortunately, while I tried to use [S]RawIO to implement
ReadUtf8Buffer and WriteUtf8Buffer, it didn't have the desired
behavior with console output. I've checked in the two experimental
procedures, if anyone is curious, but the salient point is that it
doesn't work as intended. In any case, it would have been specific
to ISO support.