I used tortoise svn to create changelist "好". :) -----邮件原件----- 发件人: C. Michael Pilato [mailto:cmpil...@collab.net] 发送时间: 2013年4月25日 20:18 收件人: Philip Martin 抄送: Bluce Lu; users@subversion.apache.org 主题: Re: svn command --cl don't support names that contain chinese characters.
On 04/25/2013 05:14 AM, Philip Martin wrote: > "Bluce Lu" <bluc...@51buy.com> writes: > >> svn command --cl don't support names that contain chinese characters. >> >> E,g. command “svn status -q D:\Project”, we see there is a changelist >> named “好”, but when use command “svn status -q --verbose D:\Project >> --ignore-externals --cl 好”, there is nothing to print. > > Does "svn st --cl 好" without the other options work? Are you using a > UTF-8 environment or some other encoding? > > Chinese changelist names should work. This works on my Linux box: > > $ svnadmin create repo > $ svn -mm import repo/format file://`pwd`/repo/f $ svn co > file://`pwd`/repo wc $ svn cl 好 wc/f $ svn st --cl 好 wc -v -q > --ignore-externals > > --- Changelist '好': > 1 1 pm wc/f > > Does that simple example work for you? Code inspection tells me that when we set changelists (with 'svn changelist') we convert the changelist name provided on the command-line to UTF-8 (svn/changelist-cmd.c:58). But when we're stashing in the options baton the value of the --changelist option, there's no such translation (svn/svn.c:2162). Your Linux box is probably using a UTF8 locale, Philip. Perhaps the OP's Windows box is using something else (GB18030 or somesuch)? Is this all that's needed? Index: subversion/svn/svn.c =================================================================== --- subversion/svn/svn.c (revision 1471390) +++ subversion/svn/svn.c (working copy) @@ -2159,7 +2159,8 @@ opt_state.remove = TRUE; break; case opt_changelist: - opt_state.changelist = apr_pstrdup(pool, opt_arg); + SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); + opt_state.changelist = utf8_opt_arg; if (opt_state.changelist[0] == '\0') { err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, -- C. Michael Pilato <cmpil...@collab.net> CollabNet <> www.collab.net <> Enterprise Cloud Development