Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2002 01:09:33 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Cliff Sarginson <cliff@raggedclown.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: SMBFS Unix to Windows End of Line Problem
Message-ID:  <20020103000932.GA1577@student.uu.se>
In-Reply-To: <20020102234006.GA13841@raggedclown.net>
References:  <3C338EC8.D20C9A67@unisys.com> <3C33904B.1029227@T-Online.DE> <20020102234006.GA13841@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 03, 2002 at 12:40:06AM +0100, Cliff Sarginson wrote:
> > Doug Fee wrote:
> > > 
> > > SMBFS works great, however, I do have a problem which I cannot figure
> > > out how to get around.  Text files in Unix terminates the line with just
> > > a linefeed whereas in Windows it terminates with a carriage return and
> > > linefeed.  So when I save a text file to a SMB share and my coworker
> > > looks at it with his Windows box, he sees one long record.  Is there a
> > > way to get the carriage return in and out of the file depending on where
> > > it is read/written to?

Not that I know of, and you probably don't really want this.
A better solution would be to get a texteditor that understands
different line-endings. That is the level at which such translations
should occur, IMO.
Otherwise there are plenty of tools to convert a textfile between
different formats.

> > > 
> > > Any advise would be greatly appreciated.
> > > 
> <Context lost due to top posting>
> 
> Is this really true ?

It is certainly the behaviour I would expect.

> I am just about to embark climbimg Mount Samba and I am somewhat alarmed
> to hear this.
> Long ago the OSI model contained a layer, called the presentation layer
> that was supposed to deal with things like this I believe.

But since just about nobody has actually implemented the OSI-model it
doesn't really matter what it contains.

> Also whatevr happened to net-ascii then, isn't it supposed to be the
> level at which this is sorted out ? I expect if I look at a text file
> for it's appearance to be independent of it's origin.

net-ascii is basically used for on-the-line representation of data and
not for data stored on the disk.

WHy would you expect a textfile to look the same regardless of where it
comes from? Remember that Unix does not differ between textfiles and
binary files. One certainly does not want binary files to be translated
this way, especially since it is a non-reversible translation.
Note also that it is not possible to write a program that can
distinguish between binary files and textfiles with 100% accuracy.

Having such a translation take place automatically would therfore be useless
unless on binary files whatsoever were stored on the disk.

> 
> Surely something wrong here ?

Not really.

> I don't know if FBSD supports "appatalk" or whatever it is called, the
> thing that supports MAC's, does that mean line-ends will be seen as a
> <CR> only if it does ?
> 
> I haven't bought my "Samba in 24 hours" book yet, so perhaps that will
> explain it all.
> 

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020103000932.GA1577>