info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS and unicode


From: Larry Jones
Subject: Re: CVS and unicode
Date: Mon, 12 Sep 2005 01:00:39 -0400 (EDT)

Christian Hujer writes:
> 
> Example: Data files from the Daimonin project (an MMORPG). They are 
> ISO-8859-1 
> text files. They must explicitely only use LF for line ending. They won't 
> work with CR/LF. The file format is specified to be plain text with LF line 
> endings only. The server and editor will not accept files with CR/LF.

Then they're not text files.  ISO 8859-1 files won't look anything like
text on an IBM mainframe that uses EBCDIC instead of ASCII.  Remember
that the main motivation for CVS was source code control.  Compilers
nearly always insist that source code be in the system's native text
file format (or a reasonable facsimile thereof), so CVS follows that
convention.  Files that cannot abide character set and/or line ending
conversions must be set as binary, even if they bear a strong
resemblence to text on some platform, unless the resemblence is
exceedingly strong and you don't care about accessing them on other
platforms.

> Most systems use LF, yes. The only CR system still in use that I know of is 
> Mac OS, and within Mac OS X this all is currently migrating from CR to LF to 
> fulfil POSIX compatibility.
> The only CR/LF systems still in use that I know of are Windows and TOS.
> All other systems that I know use LF.

There are more things in heaven and earth than are dreamed of in your
philosophy.

> But regardless, if a cvs client changes a file upon checkin or checkout other 
> than keyword replacement or diff patching, it eventually breaks the file, see 
> above example.

For one specific misuse.  Not changing the file would break the intended
use far more often.

> Really? The standard command line client converts LF to CR/LF?  As you see 
> I've never ever used the standard cvs command line client on Windows. I 
> always get Cygwin. I never use Windows without a Cygwin (which then is 
> installed to use LF, of course).

Yes, it does.  And Cygwin includes the standard CVS command line client.
If you install Cygwin with Unix line endings, you're no longer running a
Windows system, you're running a Unix-like system where the native text
file format matches the repostory text file format so no conversion
occurs.

> Since there is a standard called POSIX, and (to me) it's the task of Cygwin 
> to 
> give me the illusion of using a POSIX system even when being forced to use 
> the operating system from "The Evil Empire", I wouldn't call it wrong.

It's wrong if you ever intend to use any standard Windows utilities.  If
you're willing to content yourself with only using Cygwin utilities,
then I would no longer characterize it as wrong.

> From a data file point of view, the text file might in fact be a data file 
> which must not be modified regarding its line endings or encoding, despite 
> the fact that it has been checked in as text file, regardless of the client 
> operating system, because some software might rely upon the line endings and 
> encodings.
> In that context, converting LF to CR/LF is a Bad Thing and must not be done.

In that context, it's not a text file and must be marked as binary, no
matter how much it may look like text to you.

-Larry Jones

Pitiful.  Just pitiful. -- Calvin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]