GNU bug report logs - #10627
char-ready? is broken for multibyte encodings

Previous Next

Package: guile;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Sat, 28 Jan 2012 10:24:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Hartwig <mandyke <at> gmail.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: Andy Wingo <wingo <at> pobox.com>, 10627 <at> debbugs.gnu.org
Subject: bug#10627: char-ready? is broken for multibyte encodings
Date: Mon, 25 Feb 2013 09:23:45 +0800
On 25 February 2013 08:06, Mark H Weaver <mhw <at> netris.org> wrote:
> Andy Wingo <wingo <at> pobox.com> writes:
>
>> On Sun 24 Feb 2013 21:14, Mark H Weaver <mhw <at> netris.org> writes:
>>
>>> Maybe I'm missing something, but I don't see any semantic problem here,
>>> and it seems straightforward to implement.  'char-ready?' should simply
>>> read bytes until either a complete character is available, or no more
>>> bytes are ready.  In either case, all the bytes should then be 'unget'
>>> before returning.  What's the problem?
>>
>> The problem is that char-ready? should not read anything.
>
> Okay, but if all bytes read are later *unread*, and the reads never
> block, then why does it matter?

Taking care to still use sf_input_waiting for soft ports?  Reading
bytes from a soft port could have side effects (i.e. logging action or
similar).




This bug report was last modified 8 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.