Re: [ cl-cookbook-Bugs-546193 ] sockets example newline error

Alberto Riva <[email protected]> Sat, 20 Apr 2002 12:40:29 -0400
Newsgroups gmane.lisp.cookbook
Organization CHIP - http://chip.org/
Message-ID <[email protected]>
Lieven Marchand wrote:
> 
> I usually work around this problem by using a MAKE-STREAM-CRLF-ENDED
> function that is implemented by using MOP and Gray streams. This could
> make an example for this kind of technique. In general, the cost of
> network latency makes this efficient enough for clients

Lieven, you're welcome to add an example of your technique to the page, 
or send it to me. My example was oversimplified since the page was 
already long enough. In real life, I've found that browsers have no 
problems accepting LF-terminated lines. In the other direction, I just 
strip the extra CR from the line returned by READ-LINE.

I also have code  (mostly provided by Franz for ACL 6) to support 
different line terminators using their own simple-streams. Maybe we 
could put the two solutions together in a new page about haw to deal 
with different encodings.

Alberto


-- 
Alberto Riva
Children's Hospital
Informatics Program