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

How does subversion handle encodings?

From: Marcus Sundman <sundman_at_iki.fi>
Date: 2004-06-24 16:23:48 CEST

I've searched all subversion docs I could find but the only mention of
encoding I have found is regarding commit messages.

People on a project often use different system. This is especially common
for OSS projects where people often are in very different parts of the
world. Different platforms/locales use different line breaks and text
encodings, and most developer tools expect to find all files in whatever
happens to be the default local system text encoding and using the line
break convention of the local OS. Therefore we are faced with three
options:
A) Get all systems to standardize on one encoding and one type of line
breaks.
B) Build support for different encodings and line breaks into each tool and
supply the necessary metadata at each invokation of each such tool.
C) Transcode text files in input/output so that they are always in the
default local system encoding and using the line breaks convention of the
local OS.

I think the first two options are out of the question while the third one is
relatively easy to implement, so the decision seems like a no-brainer to
me.

Most content management (CM) systems already convert line breaks in text
files between the unix, mac and windows types. Text encoding is even more
important since it has far reaching consequences (if you have written "foo"
you do not want it to say "bar" when it's in production code) and errors
can be very hard to detect. Despite this fact many CM systems seem to
ignore the issue completely, relying on projects adopting some kind of
hybrid policy between A and B above, and communicating the needed metadata
(i.e. what encodings and line breaks to use for which files) per email or
even face to face. As can be expected, the results of such ad-hoc practices
can be very ugly.

So, how does subversion tackle these issues?

- Marcus Sundman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 24 16:24:16 2004

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.