> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2009a_at_ryandesign.com]
> Sent: maandag 6 april 2009 11:07
> To: Carpentier, Fabien
> Cc: users_at_subversion.tigris.org
> Subject: Re: [Error conversion UTF-8]
> On Apr 3, 2009, at 05:25, Carpentier, Fabien wrote:
> > Ryan Schmidt wrote:
> >> On Mar 11, 2009, at 06:34, Carpentier, Fabien wrote:
> >>> In Redmine, when I want view differences between two different
> >>> revisions, I have this error message :
> >>> svn: Safe data 'Index: Re' was followed by non-ASCII byte 195:
> >>> unable to convert to/from UTF-8
> >>> The problem is that the name file is Reédmine. (é = byte 195)
> >>> Svn seems not support accents.
> >>> I use OpenBSD 4.1, Subversion 1.5.5 and the last revision of
> >>> Redmine.
> >>> I try to solve this problem, and set this file : utf.c and
> >>> functions check_non_ascii, ..
> >>> But it doesn't work.
> >> Subversion stores filenames as UTF-8 internally. In order to be able
> >> to present filenames to you properly, it needs to know what encoding
> >> your terminal uses, so you need to set the LANG environment variable
> >> to the correct value for your terminal.
> >> I'm not sure how this applies to Redmine (never used it) but
> >> presumably Redmine needs to tell Subversion what encoding to use.
> > I search for change the lang environment variable.
> > In /etc/login.conf, I add this :
> > French:French Users Accounts:\
> > :charset=ISO-8859-15:\
> > :lang=fr_FR.ISO8859-15:\
> > :tc=default:
> > But it doesn't work. I've still the same problem.
> > And now, I have no more idea..
> I don't know about /etc/login.conf. On my Mac, I just added this line
> to my ~/.bash_profile:
> export LANG=en_US.UTF-8
On the Mac and on Windows the filesystem always uses Unicode to represent filenames (Mac as UTF-8, Windows as USC-2/UTF-16), so the LANG setting only applies to the client IO there and never to the paths.
On the unixes paths don't have a specific encoding -paths consists of bytes-, so the LANG setting applies to path names too.
In this case a file on disk has a path that can't be interpreted by the current LANG setting. (E.g. utf-8 works with lead and follow bytes for multibyte characters.. if the first byte of a multibyte character is a follow-byte it's encoding is invalid). This is probably caused by saving files with names in one encoding (E.g. ISO-8859-1) and then reading them back with another encoding (probably UTF-8).
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-07 16:46:53 CEST