A problem with tabs
I've written a c program which uses tab characters in the output. Output goes to stdout.
When I run it at the terminal command line - output is tabbbed.
If I direct output to a file (./program > book.txt) , and use "more" to display the file, output is tabbed.
If I send the file to my HP 1020 printer, output is not tabbed. I get a space at the location of each tab character.
If I try to open the file with gedit, gedit refuses to open it and says that it has not been able to detect the character encoding. I try all the obvious choices and it rejects them all.
If I try to open it with notepad, notepad opens it and shows the output as tabbed.
If I display it with od, I see the hex 09 characters in the file.
1) what is happening and why?
2) as I recall there is a utility that lets me change the attributres of a file. I imagine I can correct the encoding, but I dont remember what utility.
3) is there sometihng that i need to do as regards compiler settings to get the file marked correctly?