Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal 18 Aug 2020 09:53 UTC

On 18 Aug 2020, at 02:18, Shiro Kawai <xxxxxx@gmail.com> wrote:

> I agree.  With this regard, I think the syntax Alex suggested earlier seems to work well.  This way, octed sequence that's not valid as utf-8 can be included without ambiguity:
>
> #u8("abcde" #x80 "efghi")
>
> In the string part, we can say either ASCII-only, or utf-8 encoded string.

My objection to this is that it looks like a vector of three items: a string,
an integer, and another string. But the same applies to John’s proposed
`bytestring` function (which does not work like the R7RS `string` function in
this regard).

I still don’t get how \x80; in a #u8"…" is ambiguous. As I note in the
acknowledgements, Python has been doing exactly this for over a decade. But
maybe there are some implementation details specific to Scheme I’m missing.

Daphne