[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10627: char-ready? is broken for multibyte encodings

From: Andy Wingo
Subject: bug#10627: char-ready? is broken for multibyte encodings
Date: Mon, 25 Feb 2013 09:55:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Mark,

Are you proposing that `char-ready?' do a nonblocking read if
the buffer is empty?  That could work.

On Mon 25 Feb 2013 01:06, Mark H Weaver <address@hidden> writes:

> However, is seems to me that implementing this in terms of read-byte and
> unget-byte is simpler, because it avoids duplication of the logic
> regarding putback buffers and refilling of buffers.

Could work, if the port is nonblocking to begin with.

> I agree that 'char-ready?' is an antiquated interface, but it is
> nonetheless part of the R5RS (and Guile since approximately forever),
> and it is the only way to do a non-blocking read in portable R5RS.  It
> seems to me that we ought to try to implement it as well as we can, no?

Do what you like to do :)  But if it were my time, I would simply
document that it checks for a byte and not a character and move on.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]