Re: [Wrapl-discussion] Feedback on Wrapl-1.9-1074 for Windows
Brought to you by:
rajamukherji
|
From: Roman M. <rom...@gm...> - 2010-06-01 11:27:05
|
> It is not necessary to use Out:write to show the results in Interactive
> Wrapl, the results of a calculation are automatically displayed (and stored
> in a variable called "_"). If you use Out:write(...) then the final result
> is whatever is returned by Out:write(...) which is Out, which the
> interactive interpreter resolves to be /usr/lib/IO/Terminal.Out.
OK. Now I understand why it is outputted.
I used Out:write(...) because otherwise the result with foreign
characters is not informative:
--> ALL s[5] | s[6] | s[7];
["\xAA", "\xA8", "\xA9"]
But Out:write(...) somehow makes it right :)
> Currently Wrapl strings are only considered as arrays of single bytes
>
> --> "б":length;
> 2
On Windows in console I tried this:
--> "б":length;
1
--> "я":length;
1
then created UTF-8 file with Out:write("б":length);
C:\Home>riva utf.wrapl
2
> I think a set of UTF-8 aware methods or a subtype of String.T which is UTF-8
> aware is probably necessary.
I do not know of UTF internals and do not force you to make the
decision based on the following text, however:
About three month ago I studied GT.M (an open-source MUMPS
implementation). They are using ICU library for the purpose to employ
UTF-8. I saw the site http://icu-project.org/ . The library is quite
extensive (and comprehensive). It rather big in size.
Looking at GT.M: an interesting point is that during installation
process GT.M allows to choose to install or not to install UTF
support. GT.M distribution itself does not contain this library,
rather it relies on ICU packages that are provided for the most Linux
distributions. I saw it in the repositories of all distros I tried:
ArchLinux, ZenLinux, Debian and even TinyCoreLinux.
--
Roman
|