Re: Mixing characters and bytes
Michael Sperber 25 Aug 2005 16:54 UTC
Alex Shinn <xxxxxx@gmail.com> writes:
> On 8/25/05, Michael Sperber <xxxxxx@informatik.uni-tuebingen.de> wrote:
>>
>> The string ports specified in SRFI 6 can support byte operations
>> perfectly meaningfully. I believe SRFI 68 contains a variation of it.
>
> This is difficult to use in a Scheme that puts tight restrictions on
> its strings, such as requiring them to be valid UTF-8, or if it performs
> character-level semantic operations such as automatically
> normalizing all strings.
If you feed a string output port a bad encoding, sure you get bad
data. This is a matter of specifying what happens in that case, which
the SRFI does.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla