Saturday, June 23, 2012

Terminal Control Character Mayhem

If I am using Konsole, or sometimes even a virtual terminal, I can cat a file, and it gets dumped and sent to the program that has to interpret it.


Well, some binary data might indicate a change in character encoding...
So my terminal gladly switches to another character encoding set.


I would like to include in my Prompt(all prompts that anybody uses), some sort of  way to for-sure return to my expected character encoding.

Other ways to do this may include disabling switching of encodings (which might break some programs)

or wrap or alias commands like "cat" to encode all characters in printable standard characters. (some sort of escaping to represent what the non-printable characters are.

I think the prompt is the best place to look. The terminal programs themselves are also a prime place for work.

Either way, it is unacceptable for my whole screen to turn into gibberish just because I used cat to inspect a file... and I still don't know of a fix!

1 comment:

aaron_pet said...

http://linux.about.com/od/ttl_howto/a/hwtttl17t08.htm