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

Re: Check-out fails with LANG=C

From: Branko Čibej <brane_at_wandisco.com>
Date: Tue, 09 Jul 2013 22:34:49 +0200

On 09.07.2013 21:43, Stefan Sperling wrote:
> On Tue, Jul 09, 2013 at 09:22:39PM +0200, Andreas Krey wrote:
>> On Tue, 09 Jul 2013 20:21:33 +0000, Branko ??ibej wrote:
>> ...
>>> I posit that if the "native encoding" is supposed to be UTF-8, then it
>>> is an error to use LANG=C at all. Instead, one should use LANG=C.UTF-8.
>> No, using LANG etc. for the interface between svn and the disk mixes up
>> the setup for the UI and the disk interface. LANG tells the software
>> what language I want to use in the UI and how it should be encoded,
>> and is intended to be able to talk in different ways depending on what
>> terminal I use.
> LANG implies LC_CTYPE, if not set. svn prefers LC_CTYPE over LANG.

Specifically, Subversion's command-line tools first try

    setlocale(LC_ALL, "")

and if that fails,

    setlocale(LC_CTYPE, "")

Only if the latter fails, we look at the actual environment to construct
an error message. So we don't use environment variables to determine
which translation and encoding to use, we rely on the locale API in the
runtime library. This is the only correct way for command-line programs
to determine the locale-related characteristics of the system they're
running on.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-07-09 22:35:24 CEST

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