On Fri, Feb 23, 2007 at 08:23:50PM -0800, Vlad Skvortsov wrote:
> Malcolm Rowe wrote:
> >>After issuing the 'status' command svn gets busy, taking almost 100% of
> >I can't reproduce this on trunk. What's your LANG and related settings?
> >(the output of 'locale').
Okay, I can reproduce this now. It looks like there's a bug in
libsvn_subr/utf.c:convert_to_stringbuf(). The source character \x8b
will convert (at least according to my apr_xlate_conv_buffer()) to the
UTF-8 sequence \xe2 \x96 \x80 (U+2580 UPPER HALF BLOCK).
We pass apr_xlate_conv_buffer() the source string, source length (1),
and a destination buffer of length 2. Unfortunately, this isn't long
enough to encode the output, so APR just does nothing.
The problem is that we use (destlen == 0) to determine when to increase
the size of the buffer, but that doesn't help: there are some cases
(like this) where we can have some spare destination buffer, but not
enough to encode the next character. We should probably identify
this problem (i.e. no error, but there are the same number of source
characters remaining, or something similar), and then boost the destbuf
by some amount.
(Anyone see a straightforward way to achieve that?)
Actually, I'm surprised we don't see this more often.
Received on Sat Feb 24 06:26:37 2007
- application/pgp-signature attachment: stored