<div class="gmail_quote">On Mon, Aug 29, 2011 at 8:13 AM, Matthew Mondor <span dir="ltr"><<a href="mailto:mm_lists@pulsar-zone.net">mm_lists@pulsar-zone.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If I understand the above, READ-CHAR on a binary/bytes sequence stream,<br>
created on top of an array of UTF-8 octets would then work if the<br>
EXTERNAL-FORMAT was UTF-8 (and signal a decoding error with restart on<br>
invalid octets).</blockquote><div><br>Yes, it works like a file.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">If that's what it means, this is what I need. I need<br>
to leverage ECL's UTF-8 decoder to convert arbitrary binary byte/octets<br>
to create unicode strings[...]<br>
I also need to be able to encode ECL unicode characters (and strings,<br>
also without worrying about the internal representation) to UTF-8<br>
binary octets<br></blockquote><div><br>Ok, then you should be safe with the first part of the example.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I understand that ECL uses the internal representation that it wishes<br>
(currently UBCS-4 for unicode, or LATIN-1), and that string streams will<br>
also use that, and I shouldn't have to worry about it.<br></blockquote><div><br>Yes, that's how string streams work. And that's why there is no :external-format there. We could have extended them, but I prefer to keep ANSI CL and our extensions well separated.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On a tengent, I remember a previous thread where the internal ECL<br>
unicode format representation was discussed, that it could perhaps be<br>
changed eventually, at least on Windows</blockquote><div><br>I was discouraged to do so in the end.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Unfortunately the mmap changes broke the ECL build and I couldn't immediately test your latest changes:<br></blockquote></div><br>I am a bit surprised about this. I removed MAP_FILE because it does not work in Solaris and the POSIX specifications says it is not needed: MAP_SHARED should make the changes available for other processes immediately. Moreover, the Linux man page and the OpenBSD one both state that MAP_FILE is default and just a compatibility leftover... I will investigate, though, but I am a bit confused.<br>
<br>Juanjo<br><br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>