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

Re: Mac OS X: problems adding files with umlauts

From: Thomas Singer <subversion_at_smartcvs.com>
Date: 2006-07-06 11:32:28 CEST

Hi Ryan,

Thanks for answering.

> I think you answered your own question... you need to set LC_ALL (or LANG) first so Subversion knows what character encoding it's working with.

I've read that I need to set the LC_ALL variable, but I don't understand
why this is necessary. Shouldn't it be possible to read any file name?
What happens when the "wrong" value is set to LC_ALL? Please note, that
we talk about file *names*, not the file *content*. Specifying the
encoding for reading/writing non-default encoded text files is
necessary, but why for file *names*?

> I think you're experiencing symptoms of this:
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=2464

I think, here are two problems:
1) one needs to specify the "right" value to LC_ALL to make Subversion
    read/write file names with umlauts
2) how to handle the decomposed form of umlauts.

The second problem easily can be resolved by composing file names which
are reported decomposed by Mac's file system. At least we use this
strategy to make our CVS client work with umlauts correctly on the Mac.

But solving the second problem seems to me independent of the first
problem. BTW, the JavaSVN library does not exhibit this problem, because
Java seems to always list file names correctly (but decomposed on the
Mac). Since Java has a C core, I assume (though my limited knowledge of
such low-level C-stuff) that reading the file names correctly can be
done in Subversion, too.

--
Best regards
Thomas Singer
_____________
SyntEvo GmbH
Schillerallee 2
83457 Bayerisch Gmain
Germany
Ryan Schmidt wrote:
> On Jul 6, 2006, at 08:12, Thomas Singer wrote:
> 
>> I'm using Mac OS X 10.4.7 with Subversion 1.3.1 (r19032) and have
>> problems adding files with umlauts in the name.
>>
>> - I've created a file "Überbau.txt" in the working copy
>> - first problem: when listing the directory content on the console, the
>>   file name appears as "U??berbau.txt"
>> - when I invoke 'svn status' in this directory, I get following error
>>   message:
>>     ~/test tom$ svn status
>>     subversion/libsvn_subr/utf.c:466: (apr_err=22)
>>     svn: Can't convert string from native encoding to 'UTF-8':
>>     subversion/libsvn_subr/utf.c:464: (apr_err=22)
>>     svn: U?\204?\136berbau.txt
>>   Why that? Can't Subversion read every file name?
>> - ok, after setting LC_ALL, it works (even with the right umlaut!):
>>     ~/test tom$ export LC_ALL=en_US
>>     ~/test tom$ svn status
>>     ?       Überbau.txt
> 
> I think you answered your own question... you need to set LC_ALL (or 
> LANG) first so Subversion knows what character encoding it's working with.
> 
> 
>> - now I add the file
>>     ~/test tom$ svn add \303berbau.txt
>>     A          Überbau.txt
>> - but when I now invoke 'svn status' again, it shows the same file name
>>   as missing and unversioned:
>>     ~/test tom$ svn status
>>     ?       Überbau.txt
>>     !       Überbau.txt
>>   Shouldn't it occur as added? Is this a bug or a user-error?
> 
> I think you're experiencing symptoms of this:
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2464
> 
> I'm not sure what this "\303" is, but I think you're trying to add 
> "Überbau.txt" with a composed "Ü" (U+00DC) while you need to add it 
> decomposed, as a "U" (U+0055) followed by a combining diaeresis "¨" 
> (U+0308), like HFS+ stores it.
> 
> See the two mailing list threads linked in that bug report, and also:
> 
> http://listserv.dartmouth.edu/scripts/wa.exe?A2=ind0503&L=macscrpt&D=1&T=0&P=20432 
> 
> 
> I should note that I have never figured out how to enter non-ASCII 
> characters into the Terminal, so I don't actually know how to do the above.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 6 11:34:50 2006

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.