[m-rev.] for review: read and write bitmaps in bitmap.m

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Mar 9 09:46:39 AEDT 2022


2022-03-08 19:32 GMT+11:00 "Zoltan Somogyi" <zoltan.somogyi at runbox.com>:
> Given that string.length's C# definition is "Str.Length", the first bug looks like
> it may be not ours to fix, though it could still be our fault if we passed the wrong
> string as Str. I will do another C# bootcheck tonight with a compiler modified
> to print out the entire contents, as returns by read_file_as_string_and_num_code_units,
> to check that hypothesis.

After both Julien's fixes and mine, the bootcheck has finished; the cut-down results
are attached. For both the tests I checked, the read-in contents of the file
matches the actual contents. So we have a UTF-8 encoded file containing
(in one case) 1530 bytes, which we have read into a C# string that (when printed out)
reproduces those 1530 bytes exactly, but for which Str.Length returns only 1520.
I am suspecting that Str.Length counts code points, not code units, but as I mentioned
in my earlier email, I cannot find real info on this in the sea of useless dreck
on the web.


Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NCU2
Type: application/octet-stream
Size: 57341 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220309/1b0ad95d/attachment-0001.obj>


More information about the reviews mailing list