On Fri, Dec 4, 2020 at 1:30 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
Non-ASCII is probably common because directory paths and file names are typical values of environment variables and usually not chosen inside the ASCII range outside English-speaking countries.

Environment variables that contain byte sequences not decodable in the current locale are very rare, I would say, because such a thing would usually hint at some wrong locale. It could happen when old media in some legacy encoding are mounted in some modern Unicode system.

That's what I expected, but I wasn't sure.  Thanks. 

But even if this is rare, it doesn't preclude a malicious person from trying to purposefully crash a Scheme program using this technique.

But this seems unavoidable.  After all, if the API returns byte vectors, the program is almost certainly immediately going to try to interpret it as a string, anyway.  The program is going to have to account for this possible failure mode either way, isn't it?