[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: Sun, 24 Feb 2013 20:11:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On Sat 28 Jan 2012 11:21, Mark H Weaver <address@hidden> writes:

> The R5RS specifies that if 'char-ready?' returns #t, then the next
> 'read-char' operation is guaranteed not to hang.  This is not currently
> the case for ports using a multibyte encoding.
> 'char-ready?' currently returns #t whenever at least one _byte_ is
> available.  This is not correct in general.  It should return #t only if
> there is a complete _character_ available.

This procedure is omitted in the R6RS because it is not a good
interface.  Besides its semantic difficulties, can you think of a sane
implementation for multibyte characters?

I suggest we document that this procedure only works correctly in
encodings with 1-byte characters and recommend that people use u8-ready?


reply via email to

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