On Thu, May 23, 2013 at 4:17 PM, Philip Martin
> [bringing in dev_at_s.a.o]
> QXO <qxodream_at_gmail.com> writes:
>> os: windows
>> encoding:GBK ( chcp 936 )
>> The svnadmin upgrade command output message first line encoding
>> issue(UTF-8 show in GBK),But the second line is right encoding!
>> if change console encoding to UTF-8 (chcp 65001),output message is :
>> Repository lock acquired.
>> Please wait; upgrading the repository may take some time...
>> Upgrade completed.
> Those two lines are produced by different code paths. The first line
> is produced by repos_notify_handler:
> svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
> _("Repository lock acquired.\n"
> "Please wait; upgrading the"
> " repository may take some time...\n")));
> The second line is produced by:
> SVN_ERR(svn_cmdline_printf(pool, _("\nUpgrade completed.\n")));
> and svn_cmdline_printf uses svn_cmdline_cstring_from_utf8 to do a UTF8
> to native conversion.
> So it appears the UTF8 to native conversion is missing from
> repos_notify_handler. I think repos_notify_handler should be using
> svn_stream_printf_from_utf8 rather than svn_stream_printf.
NO. From GETTEXT(3) man pages:
In both cases, the functions also use the LC_CTYPE locale facet in
order to convert the translated message from the translator's
codeset to the ***current locale's codeset***, unless overridden by a
prior call to the bind_textdomain_codeset function.
So svn_cmdline_printf SHOULD NOT assume the input string is UTF-8
coded, it it encoded to the ***current locale's codeset***.
Received on 2013-05-23 15:07:08 CEST