Checkout
Julian Foad
committed
on 27 Apr 13
Fix non-ASCII character handling in several 'svn' command-line options, when
using a non-UTF-8 locale. In roughly decreasing order of import… Show more
Fix non-ASCII character handling in several 'svn' command-line options, when

using a non-UTF-8 locale. In roughly decreasing order of importance:

 --old, --new:

   It did not convert the path to UTF-8. It would fail to find a non-ASCII

   path, or conceivably could find the wrong path.

 --search, --search-and:

   It did not convert the search term to UTF-8. It would fail to match a

   non-ASCII search term, or conceivably could find a wrong match.

 --file:

   The check for accidentally specifying a versioned file used the

   unconverted path, and so a non-ASCII path would (most likely) not

   trigger the check when it should.

 --limit, --accept, --show-revs, --strip, --change:

   It did not convert the value to UTF-8 before parsing it. Valid values

   would work properly, but the error message displayed for an invalid

   value would display the invalid value wrongly.

 --native-eol

   Conversion to UTF-8 has been moved before comparison against fixed ASCII

   strings like 'CRLF'. This will only make a difference if there are

   character encodings in use that are not compatible with ASCII; otherwise

   it is just for consistency of coding style.

* subversion/svn/svn.c

 (sub_main): Convert option arguments to UTF-8 before using them, in most

   cases where we weren't already doing so.

* subversion/svn/cl.h

 (svn_cl__opt_state_t): Document which fields are *not* converted to UTF-8,

   instead of the previous incomplete annotation of which ones are. Remove

   the unused 'changelist' field (which was long ago superseded by the

   'changelists' array.

Show less