You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by sv...@salvisberg.com on 2007/03/24 17:36:08 UTC

"Strange" characters in file names

I run a Drupal CMS (written in PHP) on a SuSE Server under Apache, and one of the users has uploaded a file which causes svn 1.4.3 to choke:

  svn: Can't convert string from native encoding to 'UTF-8':
  svn: Kurs Ern?\195?\164hrung.doc

ls shows the file name as 

  Kurs Ern??hrung.doc

The file name should be "Kurs Ern�hrung.doc", and it probably orginated from Windows.

PHP may have messed up this one, but the file is there, and it's fully accessible in Drupal. The filename displays correctly on the web page (charset=utf-8), and the file can be downloaded.

I haven't tried adding it to the repository yet, the error appears when doing 

  svn st

Is there a way to help svn to accept this file?

Hans

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

Re: "Strange" characters in file names

Posted by Erik Huelsmann <eh...@gmail.com>.
On 3/25/07, Per Jessen <pe...@computer.org> wrote:
> Erik Huelsmann wrote:
>
> > On 3/25/07, Per Jessen <pe...@computer.org> wrote:
> >> Ryan Schmidt wrote:
> >>
> >> > On Mar 24, 2007, at 12:36, <sv...@salvisberg.com>
> >> >> The file name should be "Kurs Ernährung.doc", and it probably
> >> >> orginated from Windows.
> >> >>
> >> >
> >> > Perhaps you have not set the LANG variable so ls and svn don't know
> >> > how to properly display it. Try export LANG=de_DE.utf8 or whatever
> >> > the correct value for your OS is.
> >>
> >> That setting should not have any influence on how UTF8 characters are
> >> displayed.  They are valid regardless of your locale settings.
> >
> > They may -however- not be valid Subversion input without that
> > setting...
>
> That is true, but I would call that a bug.  The use or display of
> characters should not depend on which language subversion is set to
> use.  If you have UTF-8 support, it's either or, not "mostly"
> or "often". IMHO anyway.

Sure. Subversion is always UTF-8, internally. Externally, it uses the
encoding specified for your system. When you give it input which isn't
encoded with the system encoding, it doesn't know how to recode it to
UTF8.

When the system encoding isn't specified, US-ASCII is assumed (as
defined in the POSIX/C standard). So, when you don't specify an
encoding (meaning ASCII) and feed it UTF8 accented characters, it
doesn't know how to recode: characters with the high bit set aren't
part of the US-ASCII definition...

bye,

Erik.

Re: "Strange" characters in file names

Posted by Per Jessen <pe...@computer.org>.
Erik Huelsmann wrote:

> On 3/25/07, Per Jessen <pe...@computer.org> wrote:
>> Ryan Schmidt wrote:
>>
>> > On Mar 24, 2007, at 12:36, <sv...@salvisberg.com>
>> >> The file name should be "Kurs Ernährung.doc", and it probably
>> >> orginated from Windows.
>> >>
>> >
>> > Perhaps you have not set the LANG variable so ls and svn don't know
>> > how to properly display it. Try export LANG=de_DE.utf8 or whatever
>> > the correct value for your OS is.
>>
>> That setting should not have any influence on how UTF8 characters are
>> displayed.  They are valid regardless of your locale settings.
> 
> They may -however- not be valid Subversion input without that
> setting...

That is true, but I would call that a bug.  The use or display of
characters should not depend on which language subversion is set to
use.  If you have UTF-8 support, it's either or, not "mostly"
or "often". IMHO anyway.


/Per Jessen, Zürich

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

Re: "Strange" characters in file names

Posted by Erik Huelsmann <eh...@gmail.com>.
On 3/25/07, Per Jessen <pe...@computer.org> wrote:
> Ryan Schmidt wrote:
>
> > On Mar 24, 2007, at 12:36, <sv...@salvisberg.com>
> >> The file name should be "Kurs Ernährung.doc", and it probably
> >> orginated from Windows.
> >>
> >
> > Perhaps you have not set the LANG variable so ls and svn don't know
> > how to properly display it. Try export LANG=de_DE.utf8 or whatever
> > the correct value for your OS is.
>
> That setting should not have any influence on how UTF8 characters are
> displayed.  They are valid regardless of your locale settings.

They may -however- not be valid Subversion input without that setting...

bye,

Erik.

Re: "Strange" characters in file names

Posted by Per Jessen <pe...@computer.org>.
Ryan Schmidt wrote:

> On Mar 24, 2007, at 12:36, <sv...@salvisberg.com>
>> The file name should be "Kurs Ernährung.doc", and it probably
>> orginated from Windows.
>>
> 
> Perhaps you have not set the LANG variable so ls and svn don't know
> how to properly display it. Try export LANG=de_DE.utf8 or whatever
> the correct value for your OS is. 

That setting should not have any influence on how UTF8 characters are
displayed.  They are valid regardless of your locale settings. 


/Per Jessen, Zürich

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

Re: "Strange" characters in file names

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 24, 2007, at 12:36, <sv...@salvisberg.com>  
<sv...@salvisberg.com> wrote:

> I run a Drupal CMS (written in PHP) on a SuSE Server under Apache,  
> and one of the users has uploaded a file which causes svn 1.4.3 to  
> choke:
>
>   svn: Can't convert string from native encoding to 'UTF-8':
>   svn: Kurs Ern?\195?\164hrung.doc
>
> ls shows the file name as
>
>   Kurs Ern??hrung.doc
>
> The file name should be "Kurs Ernährung.doc", and it probably  
> orginated from Windows.
>
> PHP may have messed up this one, but the file is there, and it's  
> fully accessible in Drupal. The filename displays correctly on the  
> web page (charset=utf-8), and the file can be downloaded.
>
> I haven't tried adding it to the repository yet, the error appears  
> when doing
>
>   svn st
>
> Is there a way to help svn to accept this file?

Perhaps you have not set the LANG variable so ls and svn don't know  
how to properly display it. Try export LANG=de_DE.utf8 or whatever  
the correct value for your OS is. (The contents of the directory /usr/ 
share/locale may tell you what the valid locales are on your system.)


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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