Re: Problem with truncated string ports - more info

2013-06-21 Thread Mark H Weaver
Hi Brent, Would you be willing to help debug this a bit? It would be useful to put a breakpoint at 'scm_strport_to_string' in libguile/strports.c in the case where a truncated string is returned. After 'pt' is initialized, what's the value of 'pt->read_buf_size'? It should be the number of byte

Re: Problem with truncated string ports - resolution

2013-06-21 Thread Brent Pinkney
Hi, I have discovered that if I force the default string encoding to "UTF-8" then it works. Regards, Brent

Re: Problem with truncated string ports - more info

2013-06-21 Thread Mike Gran
>However, if I make  the input string 4095 bytes long, > then I do not get the expected 4097 long output string. > Instead, I get a resulting string truncted to 4096 bytes. > >    (define s (make-string 4095 #\x)) >    (string-length (with-output-to-string (lambda () (write s              >; a

Re: Problem with truncated string ports - more info

2013-06-21 Thread Brent Pinkney
Hi, I have some further diagnostics on my problem. As you know the string resulting from a call to write should be at least two (2) characters longer than the input string since the input string is prepended and appended with a #\x quotation character. This is indeed the case for short strin

Re: Problem with truncated string ports

2013-06-21 Thread Eli Zaretskii
> Date: Fri, 21 Jun 2013 15:44:50 +0200 > From: Brent Pinkney > > I have inspected the strings.c implementation but nothing obvious > suggests why the output string is truncated to 4096 bytes. Isn't 4096 somehow related to a pipe buffer size?