From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 10627@debbugs.gnu.org
Subject: bug#10627: char-ready? is broken for multibyte encodings
Date: Sun, 24 Feb 2013 20:11:50 +0100 [thread overview]
Message-ID: <87d2vpedc9.fsf@pobox.com> (raw)
In-Reply-To: <87ipjwktzv.fsf@netris.org> (Mark H. Weaver's message of "Sat, 28 Jan 2012 05:21:24 -0500")
On Sat 28 Jan 2012 11:21, Mark H Weaver <mhw@netris.org> 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?
instead.
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2013-02-24 19:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-28 10:21 bug#10627: char-ready? is broken for multibyte encodings Mark H Weaver
2013-02-24 19:11 ` Andy Wingo [this message]
2013-02-24 20:14 ` Mark H Weaver
2013-02-24 22:15 ` Andy Wingo
2013-02-25 0:06 ` Mark H Weaver
2013-02-25 1:23 ` Daniel Hartwig
2013-02-25 8:55 ` Andy Wingo
2013-02-26 19:50 ` Mark H Weaver
2013-02-26 19:59 ` Andy Wingo
2016-06-20 19:23 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2vpedc9.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=10627@debbugs.gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).