Bug 98796 - Corrupt text files, ^M
Corrupt text files, ^M
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: mc (Show other bugs)
9
athlon Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-08 16:23 EDT by ivo tijhaar
Modified: 2015-01-07 19:05 EST (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description ivo tijhaar 2003-07-08 16:23:44 EDT
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 09:26:50 EDT
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 09:31:12 EDT
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 06:16:38 EST
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 13:37:48 EST
Closing NOTABUG.

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