[PATCH] alexandria-1/io.lisp: (read-stream-content-into-string): fix recent regression

Madhu enometh at meer.net
Mon Aug 22 02:05:08 UTC 2022


*  MichaƂ "phoe" Herda <phoe at teknik.io> <32cf971b-ecc1-d54f-8ea6-4746cddca9ee at teknik.io>
Wrote on Sun, 21 Aug 2022 11:21:15 +0200
> This doesn't look like a problem on the Alexandria side. Stuffing
> ub8 values into any place that requires characters *always* requires
> additional information about character encoding (is it latin1?
> latin2?  windows-1250?) and dealing with character encodings is out
> of scope of Alexandria. I think that Flexi Streams/Babel should be
> explicitly used in this context.

1. The function contract requires it to return a string which is of
type character.  2. Arranging to call WITH-OUTPUT-TO-STRING with an
octet backing it is buffer is a bug.  3. Lisps implementation support
bivalent streams and alendria (correctly) deferred to the
implementations behaviour, and this has been changed.

If we accept your position, READ-STREAM-CONTENT-INTO-STRING function
would have to be removed from alexandia, since it cannot support it.




More information about the alexandria-devel mailing list