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

Re: svn checkout - special characters in file name are not encoding properly

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Fri, 13 Aug 2010 00:27:30 +0200

On 2010-08-12 17:16:37 +0200, Stefan Sperling wrote:
> On Thu, Aug 12, 2010 at 02:30:50AM +0200, Vincent Lefevre wrote:
> > On 2010-08-11 19:56:28 +0200, Stefan Sperling wrote:
> > > On Wed, Aug 11, 2010 at 04:29:56PM +0200, Vincent Lefevre wrote:
> > > > You're forcing the user to use a UTF-8 locale. Unacceptable.
> > >
> > > No, we leave users a choice.
> >
> > The choice doesn't work.
>
> It doesn't work for your twisted requirement of having a program
> running in the C locale use UTF-8. Otherwise it works fine.

Many programs are able to use UTF-8 in a C locale, such as programs
that handle XML or any file format based on UTF-8.

Also, if Subversion needs a UTF-8 locale for handle UTF-8 data, why
wouldn't there be an option to do that?

> > No, this is not *my* idea. Please read the thread again. I proposed to
> > leave the choice by storing the charset chosen by the user in the .svn
> > directory (or whatever mean following future WC formats). But you
> > didn't want this solution.
>
> It's not a solution because storing the information in wc meta-data
> does not fix anything. What is Subversion supposed to do with filenames
> that come down from the repository during an update, but cannot be
> represented in the recorded charset?

Throw an error. But if the user has chosen UTF-8 as the recorded
charset, this won't happen.

> Using UTF-8 instead of the recorded charset is out of the question.
> That leaves erroring out as the only option. So how is that
> different from the current situation?

With the current situation, a "svn up" run under the non-UTF-8 locale
will either fail or corrupt the working copy if some filenames have
non-ASCII characters. With UTF-8 recorded as the encoding for
filenames, "svn up" will always work. See the difference?

> There is a clearly defined way of letting Subversion know which
> charset to use. Set the locale. If you have to, set Subversion's
> locale to something other than what locale your terminal uses.
>
> ~/bin/mysvn:
> #!/bin/sh
> evn LC_CTYPE="en_US.<preferred charset>" svn update

Wrong, wrong, wrong! Security hole!

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Received on 2010-08-13 00:28:09 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.