Re: file encoding prob.
- From: Dan Espen <daneNO@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Nov 2006 21:27:35 -0500
igthibau@xxxxxxxxxx writes:
Dan Espen wrote:
igthibau@xxxxxxxxxx writes:
Hi there,
Right, I wrote a fortran code that reads text files and produces output.
The problem is that the files I created to test the code work fine. But
files I get from "outside", even if as ascii contain control codes that
screw things up.
Things like ^@^M and such.
dos2unix does nothing.
So, the big question is : how does one strip files from these codes, or
change them to linux standards?
This is the one thing that prevents the process to work and I am running
out of ideas here.
First be more exact in your problem description.
The "and such" part is throwing me off.
well they are the codes I see : ^X , where X=F or @ or M or D...
If you see the above symbols, you'd have to tell use which program
showed them.
gvim, vi
Better to run "od -x" and tell us if it's line endingsthey occur within text : sample : (the numbers are line no.)
only or something else.
49 ^B^@^@^@er ^B^@^@^@er
50 ce ce
51 ^F^@^@^@lenge ^F^@^@^@lenge
52 réservé réservé
A little.
It doesn't look like any fortran I've ever seen.
I'm not sure vi is a good vehicle for viewing actual
file contents. I'd trust xemacs more.
Are you sure the data you want is there?
^@ is usually NULL you can remove NULLs with sed.
something like:
s/\000//
.
- Follow-Ups:
- Re: file encoding prob.
- From: GT
- Re: file encoding prob.
- References:
- file encoding prob.
- From: igthibau
- Re: file encoding prob.
- From: Dan Espen
- Re: file encoding prob.
- From: igthibau
- file encoding prob.
- Prev by Date: Re: Why is linux slower than Windows (Firefox)?
- Next by Date: Re: Why is linux slower than Windows (Firefox)?
- Previous by thread: Re: file encoding prob.
- Next by thread: Re: file encoding prob.
- Index(es):
Relevant Pages
|