Bug 98796 - Corrupt text files, ^M
Summary: Corrupt text files, ^M
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mc   
(Show other bugs)
Version: 9
Hardware: athlon
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Jay Turner
Depends On:
TreeView+ depends on / blocked
Reported: 2003-07-08 20:23 UTC by ivo tijhaar
Modified: 2015-01-08 00:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-19 18:37:48 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

Corrupt text files, ^M


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.


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 
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:



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.

Note You need to log in before you can comment on or make changes to this bug.