Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Subversion completion don't work with UTF8 (and other) file names



On 2013-04-26 15:51:30 +0400, Paul Romanchenko wrote:
> When trying to autocomplete svn operations in path containing UTF8 file
> names, the following error occurs:
> 
> $ svn svn: E000022: Can't convert string from native encoding to 'UTF-8':
> svn: E000022: /path/to/working/copy/2.?\208?\160...
> 
> I suppose this is because of $(LC_ALL=C _call_program....) in _subversion
> completion code.

Since the error message is about native encoding (US-ASCII here,
due to the LC_ALL=C) to UTF-8, it concerns a file that is in the
repository with a non-ASCII filename (internal encoding is UTF-8).

A solution might be to retrieve the computed LC_CTYPE with the
"locale" command, then before executing svn, do the following:

_ Unset LC_ALL
_ Set LC_CTYPE to the locale determined above.
_ Set every other LC_* and LANG environment variables to "C".

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author