Re: [PATCH] Have string ports honor ‘% default-port-encoding’

2010-01-05 Thread Mike Gran
> Ludo sez: > The (undocumented) ‘scm_to_stringn ()’ returns the number of characters, > AFAICS. I'll try to get a doc patch in this weekend. The second parameter to scm_to_stringn gets filled with the result buffer length from either mem_iconveh or u32_conv_to_encoding, so it is definitely the

Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-75-g9c246c0

2010-01-05 Thread Ludovic Courtès
Hi Andy! "Andy Wingo" writes: > commit 9fdf9fd3ea7130fd85eaf0a333a965ac4d2b07c3 > Author: Andy Wingo > Date: Tue Jan 5 16:15:14 2010 +0100 > > move subr implementation details to gsubr.[ch] > > * libguile/procs.h: Move subr macros to gsubr.h. > * libguile/procs.c (scm_c_make_

Re: [PATCH] Unicode string normalization

2010-01-05 Thread Julian Graham
> You might consider checking if the string created by normalize_str > should be reduced to the 1-byte-per-character representation.  The procecure > scm_i_try_narrow_string could be used for that. Good idea -- I'll add that. Thanks!

Re: Truncated print

2010-01-05 Thread Andy Wingo
Hi :) On Tue 05 Jan 2010 01:28, l...@gnu.org (Ludovic Courtès) writes: >> On Sun 03 Jan 2010 00:52, l...@gnu.org (Ludovic Courtès) writes: > > [...] > +(truncated-print "The quick brown fox" #:width 10) (newline) +...@print{} "The quick brown..." >>> >>> I think it’d be nice to default

Re: [PATCH] Have string ports honor ‘%default- port-encoding’

2010-01-05 Thread Ludovic Courtès
Hello, Mike Gran writes: > When you write... > > +  /* Create a copy of STR in the encoding of Z.  */ > +  buf = scm_to_stringn (str, &str_len, pt->encoding, > +            SCM_FAILED_CONVERSION_ERROR); > +  /* FIXME: strdup doesn't do the right thing if BUF contains zeros, but we > +    don't k