Configure SAMBA to avoid ^M-problem

Adam Lang aalang at rutgersinsurance.com
Tue Mar 6 14:59:42 GMT 2001


Just for reference, it is a MacOS thing too.  I had someone do some webpages
with dreamweaver on a macintosh and I was viewing the source on linix and
they had ^M.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Shaun Lipscombe" <shaun.lipscombe at gasops.co.uk>
To: <samba-ntdom at us5.samba.org>
Sent: Tuesday, March 06, 2001 6:18 AM
Subject: Re: Configure SAMBA to avoid ^M-problem


> * "Jan" == Jan M Skarberg (ETO) <Jan.M.Skarberg at eto.ericsson.se> writes:
>
>  > Hi, How can I configure SAMBA so I can avoid ^M-characters?
>
> You should only get ^M (Chr+Lf) when viewing a text file saved from a
> windows machine on the samba unix box.  This is because UNIX uses nl
> as line seperators and DOS text file format is to use Chr+Lf.  If you
> view the file in question in vi you should see [DOS FORMAT] written at
> the bottom.  When you use a text editor on the unix box you are not
> using Samba to access the file so you cannot configure Samba to do the
> DOS->UNIX conversion.
>
> If you are getting ^M when viewing a file from a windows machine then
> ignore everything I have just said and I have no idea what the problem
> is :(
>
>
> Solution:
> One way around the problem is to create the text file on the unix box
> and then use Wordpad to view the file on Windows as it will view it
> correctly.  Alternatively you can use a variety of unix utils to
> convert the file (even in vi, you could do something like :%s/^V^M//g)
> like tr, sed, perl, awk to unix format.  Failing that ftp the file
> from the unix box to a windows box and it will do the translation for
> you but this is a lazy way of doing things!
>
> Hope that helps,
>
> Shaun
>
> --
>           (o_
> (o_  (o_  //\
> (/)_ (/)_ V_/_   shaun.lipscombe at gasops.co.uk
>





More information about the samba-ntdom mailing list