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

Re: File encoding

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-01-18 01:28:43 CET

On Jan 17, 2007, at 17:17, Ross Boylan wrote:

> The docs indicate that the server stores all filenames and logs as
> UTF-8, but files appear to be kept as unmodified binaries. mime-type
> can affect comparisons and eol-style can affect end of lines, but I
> don't see anything dealing with the encoding per se (even if it is
> part of the MIME type, and I'm not sure it is).
>
> I know that historically version control systems attempt to be clever
> about their files has often led to problems, but it seems to me
> conversions between encoding schemes are fairly well-defined, and
> would be useful. (Yes, I know some conversions are impossible!).

Subversion does not have this feature. Subversion stores file
contents unchanged, except for line ending conversion if you ask for
it. I believe attempting to provide encoding conversion is risky.
There is no well-established way to indicate what encoding a text
file is using. There are svn auto-props, but that wouldn't help in
all cases. For example, I write php files, most of which are in
iso-8859-1, but many of which are in utf-8 instead.

As a solution outside of Subversion, you can use iconv to convert
your files to the correct encoding for your situation before putting
them in the repository.

-- 
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
Received on Thu Jan 18 01:29:25 2007

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.