Dwallace
19th March 2002, 19:47
What's the command in vi to display control characters on an ascii file? I have invoices that I print to Optio (forms printer). A couple of invoices are generating memory errors and core dumps and will not print. I look at the file and see nothing unusual.
Thanks!
Denise
patvdv
19th March 2002, 21:45
Mm, I would not know the option in Vi by heart - if possible - but you can also use cat -v to see control-characters.
shah_bs
20th March 2002, 01:43
The command is as follows:
:set list
To revert back:
:set nolist
Each line ends with a $ symbol. The 'standard' non-printables like TAB will be seen as ^I, etc. The 'funny' ones will be seen as a \nnn, where nnn is its ascii code.
Hope this helps.
Dwallace
20th March 2002, 15:15
Thanks - the 'set list' worked. Now I can see my "$" for the end of line.
But, I didn't see the strange characters I thought I would. I'm using the ttstpconv command in my device data to send ascii file, my invoice, to Optio for printing.
I have two nearly identical invoices from Baan - one will print the other returns a 'memory fault'. My first guess was control characters in the data - though now I find none.
I get a core dump at the time of the memory fault, but I don't know how to read it - will this file tell me what's wrong?
I'm going to call Optio today - but if anyone has any suggestions, please post. (This forum is very, very helpful!)
Denise
patvdv
20th March 2002, 15:34
You can get some useful information out of the core file if you have the proper debugging tools (adb,gdb,q4). You could try to run a 'file' command on the core file and it might show you which was the offending problem, ie. the program that caused the program crash. Usually core files are only useful in combination with the offending binary and when they are analyzed by the software supplier.
NPRao
20th March 2002, 21:04
you can also try -
$ strings core | pg
and read through the contents of the core-file.