You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> on 2006/07/04 15:43:19 UTC
[PATCH] Fix an l10n encoding error for a message displayed when a
svn subcommand takes an inappropriate option taking an argument.
Hi,
I've found a minor l10n bug and created a patch to fix it.
Could you please review and approve to commit it?
# Sorry for a long title; I don't know how to describe this bug shortly...
The bug is...
In using svn with a locale for which translation for a message " arg"
contains non-ASCII characters, when an option taking an argument is not
appropriate for the subcommand, an encoding error occurs like:
nori1[17:03]% svn cat -c20043 saba:~/svnwc/subversion-trunk
subversion/libsvn_subr/utf.c:532: (apr_err=22)
svn: Can't convert string from native encoding to 'UTF-8':
subversion/libsvn_subr/utf.c:530: (apr_err=22)
svn: -c [--change] <?\229?\188?\149?\230?\149?\176>
(Actually, the second message "Can't convert..." is localized;
it is manually retranslated into English here :-) )
With LC_MESSAGES=C, of course, unlocalized message is correctly displayed:
nori1[18:08]% LC_MESSAGES=C svn cat -c20043 saba:~/svnwc/subversion-trunk
Subcommand 'cat' doesn't accept option '-c [--change] arg'
Type 'svn help cat' for usage.
And in the same conditions for svnadmin, svnlook, and svnsync, which have
both subcommands and options taking an argument, localized messages are
correctly displayed.
This patch makes relevant code in subversion/svn/main.c close to one for
svnadmin, svnlook, and svnsync.
Thanks,
-nori
[[[
Fix an l10n encoding error for a message displayed when a svn subcommand
takes an inappropriate option taking an argument.
This bug occurs only when using svn with a locale for which translation
for a message " arg" contains non-ASCII characters. svnadmin, svnlook,
and svnsync are not affected.
* subversion/svn/main.c
(main): Don't apply svn_utf_cstring_to_utf8 to UTF-8 strings generated
by svn_opt_format_option, partly reverting r9795.
]]]
Re: [PATCH] Fix an l10n encoding error for a message displayed
when a svn subcommand takes an inappropriate option taking an argument.
Posted by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp>.
Hi,
Could anyone review this patch? This is a patch to fix a genuine
(although tiny) bug for those who use svn under locales with many
multibyte characters, such as CJK-language (ja, ko, and zh) users.
I'd like to see it fixed on 1.4.x.
> I've found a minor l10n bug and created a patch to fix it.
> Could you please review and approve to commit it?
>
> # Sorry for a long title; I don't know how to describe this bug shortly...
>
> The bug is...
>
> In using svn with a locale for which translation for a message " arg"
> contains non-ASCII characters, when an option taking an argument is not
> appropriate for the subcommand, an encoding error occurs like:
>
> nori1[17:03]% svn cat -c20043 saba:~/svnwc/subversion-trunk
> subversion/libsvn_subr/utf.c:532: (apr_err=22)
> svn: Can't convert string from native encoding to 'UTF-8':
> subversion/libsvn_subr/utf.c:530: (apr_err=22)
> svn: -c [--change] <?\229?\188?\149?\230?\149?\176>
>
> (Actually, the second message "Can't convert..." is localized;
> it is manually retranslated into English here :-) )
>
> With LC_MESSAGES=C, of course, unlocalized message is correctly displayed:
>
> nori1[18:08]% LC_MESSAGES=C svn cat -c20043 saba:~/svnwc/subversion-trunk
> Subcommand 'cat' doesn't accept option '-c [--change] arg'
> Type 'svn help cat' for usage.
>
> And in the same conditions for svnadmin, svnlook, and svnsync, which have
> both subcommands and options taking an argument, localized messages are
> correctly displayed.
> This patch makes relevant code in subversion/svn/main.c close to one for
> svnadmin, svnlook, and svnsync.
Thanks,
-nori
[[[
Fix an l10n encoding error for a message displayed when a svn subcommand
takes an inappropriate option taking an argument.
This bug occurs only when using svn with a locale for which translation
for a message " arg" contains non-ASCII characters. svnadmin, svnlook,
and svnsync are not affected.
* subversion/svn/main.c
(main): Don't apply svn_utf_cstring_to_utf8 to UTF-8 strings generated
by svn_opt_format_option, partly reverting r9795.
]]]
Re: [PATCH] Fix an l10n encoding error for a message displayed when
a svn subcommand takes an inappropriate option taking an argument.
Posted by Julian Foad <ju...@btopenworld.com>.
Kobayashi Noritada wrote:
>>>>The patch looks fine and safe, so +1 to commit it with my approval,
>>
>>I have now committed it in r20883. Thanks for the patch.
>
> Thank you for reviewing and committing my patch. I noticed that it was
> uninteresting for those who use only ASCII characters in their daily lives...
Hackers like to make all parts of the software work correctly even if we don't
use some parts of it.
> And, sorry for my late answer. I was a little bit busy for a few days...
No, no, it was me who was slow. (I would have committed at when I first
replied, except my working copy was broken at the time.)
>>I would tweak the log message a bit, as the change applies to the subcommand
>>name as well as to the strings generated by svn_utf_cstring_to_utf8.
>
> ...and thinking about the log message. Was it okay?
Yes, pretty good, thanks. I only made a small change.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix an l10n encoding error for a message displayed
when a svn subcommand takes an inappropriate option taking an argument.
Posted by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp>.
Hi,
> > > The patch looks fine and safe, so +1 to commit it with my approval,
> > [...]
>
> I have now committed it in r20883. Thanks for the patch.
Thank you for reviewing and committing my patch. I noticed that it was
uninteresting for those who use only ASCII characters in their daily lives...
And, sorry for my late answer. I was a little bit busy for a few days...
> I would tweak the log message a bit, as the change applies to the subcommand
> name as well as to the strings generated by svn_utf_cstring_to_utf8.
...and thinking about the log message. Was it okay?
Regards,
-nori
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix an l10n encoding error for a message displayed when
a svn subcommand takes an inappropriate option taking an argument.
Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> The patch looks fine and safe, so +1 to commit it with my approval,
[...]
I have now committed it in r20883. Thanks for the patch.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix an l10n encoding error for a message displayed when
a svn subcommand takes an inappropriate option taking an argument.
Posted by Julian Foad <ju...@btopenworld.com>.
Kobayashi Noritada wrote:
> [[[
> Fix an l10n encoding error for a message displayed when a svn subcommand
> takes an inappropriate option taking an argument.
Thanks, and sorry that it took so long to get a response.
The patch looks fine and safe, so +1 to commit it with my approval, though I
have only examined it and not actually tested it myself.
> This bug occurs only when using svn with a locale for which translation
> for a message " arg" contains non-ASCII characters. svnadmin, svnlook,
> and svnsync are not affected.
>
>
> * subversion/svn/main.c
> (main): Don't apply svn_utf_cstring_to_utf8 to UTF-8 strings generated
> by svn_opt_format_option, partly reverting r9795.
> ]]]
I would tweak the log message a bit, as the change applies to the subcommand
name as well as to the strings generated by svn_utf_cstring_to_utf8.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org