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

Re: Problems with accents in filenames

From: Vincent Lefevre <vincent+svn_at_vinc17.org>
Date: 2003-11-20 23:41:59 CET

On 2003-11-20 16:52:24 +0000, Philip Martin wrote:
> Vincent Lefevre <vincent+svn@vinc17.org> writes:
> > So, if the path comes from the user input, it should be converted
> > into UTF-8. However, if the path comes from the file system
> > (e.g. when doing a recursive operation), no conversion should occur.
> There is no difference between "user input" and "from the file
> system".

There is a difference: When the user inputs non-ASCII characters,
their encoding depends on the locales (hence the sequences should
be converted into UTF-8). But when a filename comes from the
filesystem, it is already in the UTF-8 encoding (unless the user
has broken things), so no conversion is needed.

> $ mkdir wc/bar
> $ mkdir wc/bar/`printf "foo\xe9\xe5"`
> $ LANG=en_GB svn add wc/bar
> The awkward path has still got to be converted as the 8859-1 sequence
> is not a valid UTF-8 sequence.

Your pathname is not valid. Well, perhaps Subversion can try to guess
the encoding in this case. But if all the pathname components are valid
UTF-8, no conversion should occur.

Vincent Lefèvre <vincent_at_vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 20 23:43:01 2003

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.