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

[PATCH] Fix non-ASCII cmdline options in non-UTF-8 locales

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 26 Apr 2013 00:32:32 +0100 (BST)

While reviewing r1475724 "Fix changelist filtering when --changelist values aren't UTF8", I noticed we also fail to convert some other command-line options to UTF-8. The attached patch addresses: á --old, --new: ááá Fix usage of non-ASCII paths. It looked for the wrong file and so was ááá unusable. á --search, --search-and: ááá Fix usage of non-ASCII search terms. It looked for the wrong text and so ááá was unusable. á --limit, --accept, --show-revs, --strip, --change: ááá Fix the error message shown for an invalid value. It showed the invalid ááá value using backslash-escape notation for the non-ASCII characters. á --file: ááá Fix the check for accidentally specifying a versioned file. It looked ááá for the wrong file and so typically would not trigger when it should. á --with-revprop: ááá - '=' characters are examined before converting to UTF-8; this should be safe becaue '=' is in the ASCII Basic Code Table [1]. á á - Property names are always converted to UTF-8; this is good. ááá - Property values are not; this would be wrong for svn:* props, but svn:* props are not currently allowed to be set by this method, so OK. Some other arguments, including '--native-eol', are not converted before testing for valid values, and the valid values are always ASCII.á This is OK, if we assume an ASCII subset.á That's probably safe, as [1] indicates that all common encodings except EBCDIC have an ASCII subset.á On the other hand, it does no harm to convert first, and doing so is more consistent with how we handle other options. Any comments? - Julian [1] ASCII IRV and BCT <http://www.debian.org/doc/manuals/intro-i18n/ch-codes.en.html#s-ascii>. -- Join WANdisco's free daily demo sessions on Scaling Subversion for the Enterprise <http://www.wandisco.com/training/webinars>

Received on 2013-04-26 01:33:26 CEST

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