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

Re: [PATCH.1] be more tolerant of locale errors

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-04-21 22:57:30 CEST

Peter Samuelson wrote:
> [Peter N. Lundblad]
>
>> And in fact I'm wondering if this whole error out on locale error is
>> a false protection. Nothing stops the user from running the client
>> with the wrong locale, which should be as likely (or more likely?) as
>> using a broken ditto.
>>
>
> That's a good point.
>
>
>> - Set LC_ALL category.
>> - If that fails:
>> - Set LC_CTYPE category
>> - If that fails, print a warning and continue.
>>
>
> That sounds sensible too.
>
> [[[
> Make locale handling more forgiving in the clients.
>
> * subversion/libsvn_subr/cmdline.c (svn_cmdline_init): Try setting both
> LC_ALL and LC_CTYPE locale variables, warning only if both fail.
> Do not consider this a fatal error.
> ]]]
>
> Index: subversion/libsvn_subr/cmdline.c
> ===================================================================
> --- subversion/libsvn_subr/cmdline.c (revisione 19429)
> +++ subversion/libsvn_subr/cmdline.c (copia locale)
> @@ -104,7 +104,8 @@
> /* C programs default to the "C" locale. But because svn is supposed
> to be i18n-aware, it should inherit the default locale of its
> environment. */
> - if (!setlocale(LC_ALL, ""))
> + if (!setlocale(LC_ALL, "") &&
> + !setlocale(LC_CTYPE, ""))
>
Only if you write up a FAQ entry that we can refer those users to who
complain that they've set the locale but Subversion doesn't print
messages in their chosen language.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 22 23:04:52 2006

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.