Re: [PATCH] Fix encoding bug of 'svnserve -h'
From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2004-11-10 20:01:59 CET
Hi,
Thank you for youf feedback.
> Index: subversion/include/svn_opt.h
> Index: subversion/svnserve/main.c
> Thanks for keeping a eye on encoding bugs,
Asian languages are sensitive to those bugs although they may make
Regards,
-- |: Noritada KOBAYASHI |: Dept. of General Systems Studies, |: Graduate School of Arts and Sciences, Univ. of Tokyo |: E-mail: nori1@dolphin.c.u-tokyo.ac.jp (preferable) |: nori@esa.c.u-tokyo.ac.jp Log: Fix encoding bug of 'svnserve -h', which is part of issue #1997. * subversion/svnserve/main.c (help): Use svn_cmdline_fprintf, which does UTF8->locale conversions, instead of fprintf because svn_opt_format_option localizes the documentation strings of options when formatting, even if these strings are not marked with N_(). * subversion/include/svn_opt.h (svn_opt_format_option): Add notes so that everyone may notice that this function localizes the documentation strings of options. Index: subversion/include/svn_opt.h =================================================================== --- subversion/include/svn_opt.h (revision 11818) +++ subversion/include/svn_opt.h (working copy) @@ -139,6 +139,9 @@ /** * Print an option @a opt nicely into a @a string allocated in @a pool. * If @a doc is set, include the generic documentation string of option. + * + * Note that the documentation string is localized even if it is not marked + * with N_() in its definition. */ void svn_opt_format_option (const char **string, Index: subversion/svnserve/main.c =================================================================== --- subversion/svnserve/main.c (revision 11818) +++ subversion/svnserve/main.c (working copy) @@ -137,16 +137,17 @@ { apr_size_t i; - puts("Usage: svnserve [options]\n" - "\n" - "Valid options:"); + svn_error_clear (svn_cmdline_fprintf(stdout, pool, + "Usage: svnserve [options]\n" + "\n" + "Valid options:")); for (i = 0; svnserve__options[i].name && svnserve__options[i].optch; i++) { const char *optstr; svn_opt_format_option(&optstr, svnserve__options + i, TRUE, pool); - fprintf(stdout, " %s\n", optstr); + svn_error_clear (svn_cmdline_fprintf(stdout, pool, " %s\n", optstr)); } - fprintf(stdout, "\n"); + svn_error_clear (svn_cmdline_fprintf(stdout, pool, "\n")); exit(1); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Wed Nov 10 20:02:13 2004 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.