in reply to special character printed on screen but not to file

It's a vt100 code which is interpreted when you print it on the screen but not when you print itinto a file.
OR
It's an extended character (above 127) which is properly displayed by your terminal emulator (using the right associated character table) but not when you write it to a file.

UPDATE :
Whatever the case you must understand that the character which is displayed on your screen heavily depends on your screen configuration
(especially for char with a value above 127 = non pure 7bits ASCII)
You save/give to the screen a character code, then this character is interpreted either by your screen emulator either by your file viewer (maybe differently)
on my linux box this chr(132) display an invisible char...
So if your question is how to see the same char on the screen and in the file, the answer is :
display the file with an utility using the same configuration for the screen setup.

The best solution to prevent this kind of problem, is to only use char < 128 (truely portable) and avoiding vt-100 codes which could be interpreted differently.


"Trying to be a SMART lamer" (thanx to Merlyn ;-)
  • Comment on Re: special character printed on screen but not to file

Replies are listed 'Best First'.
Re: Re: special character printed on screen but not to file
by Anonymous Monk on Mar 22, 2001 at 15:33 UTC
    So what can I do about that?