From owner-freebsd-questions Wed Jan 2 16: 9:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailg.telia.com (mailg.telia.com [194.22.194.26]) by hub.freebsd.org (Postfix) with ESMTP id D28C837B41A for ; Wed, 2 Jan 2002 16:09:40 -0800 (PST) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailg.telia.com (8.11.6/8.11.6) with ESMTP id g0309cQ04573 for ; Thu, 3 Jan 2002 01:09:39 +0100 (CET) Received: from falcon.midgard.homeip.net (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id BAA04363 for ; Thu, 3 Jan 2002 01:09:34 +0100 (CET) Received: (qmail 1610 invoked by uid 1001); 3 Jan 2002 00:09:33 -0000 Date: Thu, 3 Jan 2002 01:09:33 +0100 From: Erik Trulsson To: Cliff Sarginson Cc: freebsd-questions@freebsd.org Subject: Re: SMBFS Unix to Windows End of Line Problem Message-ID: <20020103000932.GA1577@student.uu.se> Mail-Followup-To: Cliff Sarginson , freebsd-questions@freebsd.org References: <3C338EC8.D20C9A67@unisys.com> <3C33904B.1029227@T-Online.DE> <20020102234006.GA13841@raggedclown.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020102234006.GA13841@raggedclown.net> User-Agent: Mutt/1.3.24i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. > > > > > > 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 > only if it does ? > > I haven't bought my "Samba in 24 hours" book yet, so perhaps that will > explain it all. > -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message