You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jonas De Vuyst <jd...@gmail.com> on 2004/07/04 14:46:06 UTC

bug: svn add accepts non-ASCII characters but svn ci crashes on them

Hi

I believe to have encountered a bug, but am sending this mail per
instructions on the web site and because I'm not sure what the
``correct'' behaviour should be like.

The problem is that when I 'svn add' a directory (I suppose this will
be true for files also) with non-ASCII characters in its name, those
characters are blindly copied into .svn/entries. This is a problem
because when I subsequently run 'svn ci' I get an XML parse error
('invalid token' it says, with mention of the line where the weird
char is at).

The filenames in question are encoded in iso-8859-1. Specifically the
problem I'm having occurs at characters '°' (176) and 'é' (233).

Ideally, I think, the filename would be converted to utf-8 (I notice
.svn/entries used this)or escaped to XML entities before being copied
into .svn/entries. The filename would then live as a utf-8 encoded
string in the repository. On checkout the filename would be translated
to iso-8859-1 again. This scenario assumes that svn somehow knows the
encoding used in filenames. I don't know how that should work though.

Alternatively perhaps the filename should as it currently happens be
copied literally still but the XML parser should be changed to accept
more characters. This solution strikes me as the most obvious one. But
perhaps it is obviously wrong.

A last possibility would be to only accept ASCII characters. In that
case a nicer error message would be appreciated. :-)

Thoughts would be appreciated (like should I file a bug, did I do
something brain dead, &c.).

Regards
Jonas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: bug: svn add accepts non-ASCII characters but svn ci crashes on them

Posted by Jonas De Vuyst <jd...@gmail.com>.
On Mon, 5 Jul 2004 09:04:23 +0430, Stephane Bortzmeyer
<bo...@nic.af> wrote:
> On Sun, Jul 04, 2004 at 04:46:06PM +0200,
>  Jonas De Vuyst <jd...@gmail.com> wrote
>  a message of 40 lines which said:
> 
> > The problem is that when I 'svn add' a directory (I suppose this
> > will be true for files also) with non-ASCII characters in its name,
> > those characters are blindly copied into .svn/entries.
> 
> I cannot reproduce your bug, neither with files, nor with
> directories. The file name is converted to UTF-8 (as it should be) in
> .svn/entries.

Thanks for the help. Turns out I didn't have $LANG set correctly. Or
that my web app doesn't respect that setting anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug: svn add accepts non-ASCII characters but svn ci crashes on them

Posted by Branko Čibej <br...@xbc.nu>.
Stephane Bortzmeyer wrote:

>On Sun, Jul 04, 2004 at 04:46:06PM +0200,
> Jonas De Vuyst <jd...@gmail.com> wrote 
> a message of 40 lines which said:
>  
>
>>Alternatively perhaps the filename should as it currently happens be
>>copied literally still but the XML parser should be changed to
>>accept more characters.
>>    
>>
>Certainly not, it would violate the XML standard and other XML tools
>would no longer to able to access the Subversion files.
>  
>
Agreed, but I'd like to remind people that other tools have no business 
looking at the .svn/entries file.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug: svn add accepts non-ASCII characters but svn ci crashes on them

Posted by Stephane Bortzmeyer <bo...@nic.af>.
On Sun, Jul 04, 2004 at 04:46:06PM +0200,
 Jonas De Vuyst <jd...@gmail.com> wrote 
 a message of 40 lines which said:

> The problem is that when I 'svn add' a directory (I suppose this
> will be true for files also) with non-ASCII characters in its name,
> those characters are blindly copied into .svn/entries.

I cannot reproduce your bug, neither with files, nor with
directories. The file name is converted to UTF-8 (as it should be) in
.svn/entries.

svn, version 1.0.0
   compiled Feb 24 2004, 22:41:54

> The filenames in question are encoded in iso-8859-1.

Me too.

> Alternatively perhaps the filename should as it currently happens be
> copied literally still but the XML parser should be changed to
> accept more characters.

Certainly not, it would violate the XML standard and other XML tools
would no longer to able to access the Subversion files.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org