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

Re: svnadmin upgrade output message i18n issue

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 23 May 2013 09:17:06 +0100

[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.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-05-23 10:17:46 CEST

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