Bug 98796

Summary: Corrupt text files, ^M
Product: [Retired] Red Hat Linux Reporter: ivo tijhaar <ivo>
Component: mcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Jay Turner <jturner>
Severity: high Docs Contact:
Priority: medium    
Version: 9CC: ivo, leonard-rh-bugzilla, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-19 18:37:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ivo tijhaar 2003-07-08 20:23:44 UTC
Summary: 

Corrupt text files, ^M

Description:

I installed red hat 9.0 on six different systems multiple times. With different 
software combinations. I tried a minimal instalation and a full instalation and 
a few custom installations. 

All the installations give a following problem:

Every line in a new created text file is ending with ^M. Binairie files don't 
have the problem. ^M is visible when file is created by a program and then 
openend by mc.

Reproducibility:

Every time.

Steps to Reproduce :

1.Create a text file with windows or PHP. The file must contain carrage returns 
for a new line. A file with one line or no carage return doesn't have the 
problem.
2.when created with windows upload it with ftp, samba or webupload. 
3.when uploading with ftp don't use ascii mode some how in this mode the file 
is made correct.
4.now open the file with mc every line is now ending on ^M.
5. when creating a file with php use /r/n to make a carrage return.
6. when you don't use the /r no ^M is made.
7. you can also made this bug by download a text file with windows. suchs a a 
php, perl, html or just text file and then upload it to the linux box.

Actual Results:

time after time the bug is rising i made the same installations with red hat 
7.3 8.0 suse 7.3 mandrake 8.0 8.1 8.2 and they don't have the problem. mandrake 
9.0 and red hat 9.0 have the bug.

Expected Results :

No ^M at the end of a line some programs just don't like the ^M.

Additional Information :

fwrite($file_open_new,"text\r\n") in a php script will write this in the file:

text^M

Severity:

Bug that should be fixed.

Comment 1 ivo tijhaar 2003-07-09 13:26:50 UTC
The bug is caused by mc. i used the mc from red hat 8.0 and the bug is solved.

Comment 2 ivo tijhaar 2003-07-10 13:31:12 UTC
Why is this issue closed? I solved the problem by installing mc from 8.0 on my 
9.0. This means that i must use an older version of mc to solve the problem. 
will there be a bug fix coming soon?

Comment 3 Leonard den Ottolander 2004-01-30 11:16:38 UTC
I don't believe this to be a bug. I guess you are working with files
that contain dos carriage return/line feed pairs. Unix uses line feeds
only. In mc the crs are represented by a ^M.

Try a dos2unix <file> and see if the ^M's dissappear. If you use ftp
to upload you can substitute the crlfs by lfs by setting transfer mode
to ascii on text files.



Comment 4 Leonard den Ottolander 2004-03-19 18:37:48 UTC
Closing NOTABUG.