[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Svn import error

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-09-02 00:35:26 CEST

[taking this to dev@]

Ben Collins-Sussman wrote:

>
> On Sep 1, 2005, at 3:14 PM, Branko Čibej wrote:
>
>>
>> Since when is 127 (delete, not backspace) invalid utf-8? Of course
>> it's not, it is in fact in the ASCII subrange!
>
>
>
> So maybe his iconv was broken...?

The docstring for check_non_ascii in utf.c says:

/* Return APR_EINVAL if the first LEN bytes of DATA contain anything
   other than seven-bit, non-control (except for whitespace) ASCII
   characters, finding the error pool from POOL. Otherwise, return
   SVN_NO_ERROR. */

And the code does:

      if ((! apr_isascii (*data))
          || ((! apr_isspace (*data))
              && apr_iscntrl (*data)))

(Those should be svn_ctype_is*, but no matter).

So it seems that, if iconv isn't used, we forbid all ASCII control
characters in any non-fuzzily converted string (which includes file
names). But we allow horizontal tabs, vertical tabs and linefeeds.

And we allow ASCII control chars in filenames if we _do_ have iconv,
even though the conversion to/from UTF-8 is a no-op. How weird. I can't
help feeling that this is a ... misfeature, to say the least.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 2 00:36:14 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.