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

Re: about character set / encoding conversion in subversion

From: Gunter Ohrner <G.Ohrner_at_post.rwth-aachen.de>
Date: 2006-01-05 20:10:49 CET

Ben Collins-Sussman wrote:
>> So far I've always believed, and the docs I found seemed to support it in
>> my eyes, that subversion converts all file names from a client's custom
>> locale to UTF8 and only managed UTF8 encoded names internally. I imagined

> Yes, that's how it works.

Mh, ok. So that's good news that I have a correct idea of how svn should
work, and bad news as now I really do not understand what's up with my
server... :-/

>> What character recoding is done within the server (svnserve 1.1.4) and
>> how do I have to configure the server to know all neccessary encodings?

> So 'svn' does this the most, obviously. But even simple programs like
> 'svnserve' or 'svnlook' do it to a small degree. For example,
> svnserve has its own svnserve.conf file which contains locally-encoded
> system paths. svnserve needs to convert them to UTF8 before passing
> them to internal APIs.

Ok. Well, generally, svnserve works fine with just this repository.
(svnserve 1.1.4 using bdb backend.) However, if trying to commit changed
files containing umlauts, svnserve (!) answers "Can't recode string" to the
client's request. Comitting files / whole directories to this repository
which do not contain any special characters works just fine.

The client is using de_DE@euro (ISO 8859-15) as its locale, that is the
LANG-environment variable is set to this value, "locale -a" lists
"de_DE@euro" (besides others) and I have no problems working locally with
the offending files.

So how can I find what svnserve is trying to recode, between which charsets
it wants to recode, and why it's failing?

On the client it looks like that:

-----------------------------------------------------------------------
read(3, "( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) ) ", 4096) = 52
write(3, "( 2 ( edit-pipeline )
   41:svn://192.168.42.1/home/misc/Spr%C3%BCche ) ", 69) = 69
read(3, "( failure ( ( 22 19:Can\'t recode string
   28:subversion/libsvn_subr/utf.c 363 ) ) ) ", 4096) = 82
-----------------------------------------------------------------------

Looking at the code reveals that a call to apr_xlate_conv_buffer inside
Subversion's convert_to_stringbuf seems to be failing.

Thanks a lot for your explanations!

Greetings,

  Gunter

-- 
Biers was where the undead drank. And when Igor the barman was asked 
for a Bloody Mary, he didn't mix a metaphor.        -- (Terry 
Pratchett, Hogfather)
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 5 21:04:08 2006

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