Commit Graph

1 Commits

Author SHA1 Message Date
Peter Wang
9b25e167e1 Define behaviour of string.to_char_list (and rev) on ill-formed sequences.
library/string.m:
    Define string.to_char_list and string.to_rev_char_list to either
    replace code units in ill-formed sequences with U+FFFD or return
    unpaired surrogate code points.

    Use Mercury version of do_to_char_list instead of updating
    the foreign language implementations.

tests/hard_coded/Mmakefile:
tests/hard_coded/string_char_list_ilseq.exp:
tests/hard_coded/string_char_list_ilseq.exp2:
tests/hard_coded/string_char_list_ilseq.m:
    Add test case.
2019-10-24 09:14:46 +11:00