[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading data from a file descriptor
From: |
tomas |
Subject: |
Re: Reading data from a file descriptor |
Date: |
Tue, 17 Nov 2015 13:52:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, Nov 17, 2015 at 12:59:56PM +0000, Chris Vine wrote:
> On Tue, 17 Nov 2015 10:53:19 +0100
[...]
> guile's R6RS implementation has get-bytevector-some, which will do that
> for you, with unix-read-like behaviour.
Thank you a thousand. You made me happy :-)
> You cannot use this for UTF-8 text by trying to convert the bytevector
> with utf8->string, because you could have received a partially formed
> utf-8 character.
I understand that. If you want to do that you need an incremental
converter, like the one provided by iconv(3).
> So for text, you should use line orientated reading,
> such as with ice-9 read-line or R6RS get-line.
Not necessarily, see above. Perhaps just sub-streams of your input are
UTF-8, or whatever; but yes, the parsing responsibility is then with
the user, by whatever means.
Thank you again. I was looking for that function all in the wrong
places :-/
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlZLIwUACgkQBcgs9XrR2kZ8IQCfUDejBFEWgnDcZrEESv0pT0uT
JnkAnRdDUpD2uwIlObNlTRXChENtdZHB
=s1WT
-----END PGP SIGNATURE-----
- Re: Reading data from a file descriptor, (continued)
- Re: Reading data from a file descriptor, Andreas Rottmann, 2015/11/07
- Re: Reading data from a file descriptor, Jan Synáček, 2015/11/09
- Re: Reading data from a file descriptor, Mark H Weaver, 2015/11/13
- Re: Reading data from a file descriptor, Jan Synáček, 2015/11/13
- Re: Reading data from a file descriptor, Thompson, David, 2015/11/13
- Re: Reading data from a file descriptor, Jan Synáček, 2015/11/16
- Re: Reading data from a file descriptor, Thompson, David, 2015/11/16
- Re: Reading data from a file descriptor, Amirouche Boubekki, 2015/11/16
- Re: Reading data from a file descriptor, tomas, 2015/11/17
- Re: Reading data from a file descriptor, Chris Vine, 2015/11/17
- Re: Reading data from a file descriptor,
tomas <=
- Re: Reading data from a file descriptor, Chris Vine, 2015/11/17
- Re: Reading data from a file descriptor, tomas, 2015/11/17
- Re: Reading data from a file descriptor, Jan Synáček, 2015/11/18
- Re: Reading data from a file descriptor, tomas, 2015/11/16
- Re: Reading data from a file descriptor, Andreas Rottmann, 2015/11/23
- Re: Reading data from a file descriptor, tomas, 2015/11/24