[CentOS] exam txt file

Stephen Harris lists at spuddy.org
Thu Apr 17 13:31:56 UTC 2008


On Thu, Apr 17, 2008 at 06:13:40AM -0700, Hiep Nguyen wrote:
> yes, corruption indeed, but i want to study why the program writes ^@ to 
> this file.

It's mostly likely not an ASCII file; it's probably UTF16 or similar
so there are two bytes for every character, but the high byte is 0x00
which shows as ^@.

If this is true then
  tr -d '\000' < badfile > goodfile
will most likely fix it.

-- 

rgds
Stephen



More information about the CentOS mailing list