[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-20 17:30:06 CET

Vincent Lefevre <vincent+svn@vinc17.org> writes:

> Creating a path in the working copy isn't user interaction. I want
> UTF-8 to be the encoding in the working copy (just like anywhere on
> the file system), even when I use ISO-8859-1 locales.

How would that work? An ISO-8859-1 name may not be a valid UTF-8
sequence, so it gets converted when committed. If it didn't get
converted back when retrieved then the original name would not be
restored.

Create a subdirectory with an "awkward" name

  $ svnadmin create repo
  $ svn co file://`pwd`/repo
  $ LANG=en_GB svn mkdir wc/`printf "foo\xe9\xe5"`
  $ LANG=en_GB svn ci wc -m "awkward name"

Checkout two more working copies

  $ LANG=en_GB svn co file://`pwd`/repo wc2 # "foo\xe9\xe5"
  $ LANG=en_GB.UTF-8 svn co file://`pwd`/repo wc3 # "foo\xc3\xa9\xc3\xa5"

Essentially we are doing

  $ printf "foo\xe9\xe5" | iconv --from ISO-8859-1 --to UTF-8
  $ printf "foo\xc3\xa9\xc3\xa5" | iconv --from UTF-8 --to ISO-8859-1

We have to do the first conversion because "foo\xe9\xe5" is not a
valid UTF-8 sequence, and we have to do the second conversion to get
back to the original name. How else do you suggest it works?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 20 17:30:56 2003

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