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

Re: Symlinks with umlauts

From: Saulius Grazulis <grazulis_at_akl.lt>
Date: 2005-06-30 10:21:21 CEST

On Thursday 30 June 2005 09:27, Michael Klemm wrote:

> faui20c [/srv/svn/tmp/test] [25]> touch "äöü"
> faui20c [/srv/svn/tmp/test] [26]> ln -s äöü umlaut
> faui20c [/srv/svn/tmp/test] [27]> svn add umlaut
> A         umlaut
> faui20c [/srv/svn/tmp/test] [28]> svn ci -m ""
> ...
> Adding         umlaut
> Transmitting file data .svn: Commit failed (details follow):
> svn: Can't convert string from native encoding to 'UTF-8':
> svn: ?\228?\246?\252

For me, this only happens if locale is not UTF-8.

Try ( export LC_CTYPE=en_US.UTF-8; svn ... ) # in bash
or ( setenv LC_CTYPE en_US.UTF-8; svn ... ) # in tcsh

Does it work then?

I was recently playing with locales, and found that I can put all kinds of
UTF8 stuff into a subversion repository.

With ( export LC_CTYPE=lt_LT.UTF-8; xterm -fa "Mono" )& it works fine:

(sorry for a long transcript, I tried to test all possible functions, and no
time for fine-editing):

#------- begin UTF8 log--------
saulius@kolibris: wc/ > ll
total 0
-rw-r--r-- 1 saulius 0 Jun 27 18:14 Sąžinė
-rw-r--r-- 1 saulius 0 Jun 27 18:12 Вот-и-файл-по-русский
saulius@kolibris: wc/ > touch "äöü"
saulius@kolibris: wc/ > ls -l
total 0
-rw-r--r-- 1 saulius 0 Jun 27 18:14 Sąžinė
-rw-r--r-- 1 saulius 0 Jun 30 11:05 äöü
-rw-r--r-- 1 saulius 0 Jun 27 18:12 Вот-и-файл-по-русский
saulius@kolibris: wc/ > ln -s äöü umlaut
saulius@kolibris: wc/ > ls -l
total 1
-rw-r--r-- 1 saulius 0 Jun 27 18:14 Sąžinė
lrwxrwxrwx 1 saulius 6 Jun 30 11:05 umlaut -> äöü
-rw-r--r-- 1 saulius 0 Jun 30 11:05 äöü
-rw-r--r-- 1 saulius 0 Jun 27 18:12 Вот-и-файл-по-русский
saulius@kolibris: wc/ > svn st
? umlaut
? äöü
saulius@kolibris: wc/ > svn add umlaut
A umlaut
saulius@kolibris: wc/ > svn ci -m "Adding a symlink that points to a file with
umlauts"
Adding umlaut
Transmitting file data .
Committed revision 2.
saulius@kolibris: wc/ > svn up
At revision 2.
saulius@kolibris: wc/ > svn st
? äöü
saulius@kolibris: wc/ > svn add äöü
A äöü
saulius@kolibris: wc/ > svn ci -m "Adding file that contains umlauts in its
name"
Adding äöü
Transmitting file data .
Committed revision 3.
saulius@kolibris: wc/ > svn up
At revision 3.
saulius@kolibris: wc/ > cd ..
saulius@kolibris: subversion/ > ll
total 1
drwxr-xr-x 7 saulius 224 Jun 29 12:46 repo/
drwxr-xr-x 3 saulius 208 Jun 30 11:05 wc/
saulius@kolibris: subversion/ > mkdir wc2
saulius@kolibris: subversion/ > cd wc2
saulius@kolibris: wc2/ > ( cd ../wc; svn info )
Path: .
URL: file:///home/saulius/tests/subversion/repo
Repository UUID: a546e643-abfa-0310-a145-94fac5c61bf7
Revision: 3
Node Kind: directory
Schedule: normal
Last Changed Author: saulius
Last Changed Rev: 3
Last Changed Date: 2005-06-30 11:06:59 +0300 (Thu, 30 Jun 2005)

saulius_at_kolibris: wc2/ > svn co file:///home/saulius/tests/subversion/repo .
A Sąžinė
A umlaut
A Вот-и-файл-по-русский
A äöü
Checked out revision 3.
saulius@kolibris: wc2/ > ls -l
total 0
-rw-r--r-- 1 saulius 0 Jun 27 18:14 Sąžinė
-rw-r--r-- 1 saulius 0 Jun 30 11:05 umlaut
-rw-r--r-- 1 saulius 0 Jun 30 11:05 äöü
-rw-r--r-- 1 saulius 0 Jun 27 18:12 Вот-и-файл-по-русский
saulius@kolibris: wc2/ > locale
LANG=
LC_CTYPE=lt_LT.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
#------- end UTF-8 log

However, with C locale there are problems like yours:

#------- begin POSIX log
saulius@kolibris: wc/ > svn status
svn: Can't convert string from native encoding to 'UTF-8':
svn: ?\195?\164?\195?\182?\195?\188

saulius@kolibris: wc/ > locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
#------- end POSIX log

Hope this helps...

NB. I have a custom subversion compiled from the text-time branch at revision
r13350 (pretty old these days...)

-- 
Saulius Gražulis
Visuomeninė organizacija "Atviras Kodas Lietuvai"
P.Vileišio g. 18
LT-10306 Vilnius
Lietuva (Lithuania)
tel/fax:      (+370-5)-210 40 05
mobilus:      (+370-684)-49802, (+370-614)-36366

  • application/pgp-signature attachment: stored
Received on Thu Jun 30 10:24:55 2005

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.