The strangest error ever in Unix

Not even sure how to explain this but I connect to a remote computer and execute a command which outputs various stuff to stdout for about 10 minutes. (I am basically running some experiments on a tool). After some time during the execution, the English characters that are being output strangely change into characters like below and stay like that even after the execution is finished. Below is me typing echo "what the hell" to the command line followed by the resulting output. This does not happen unless I use ssh. What on earth is going on?

°┤⎽␋⎺┼02% ␊␌␤⎺ "┬␤▒├ ├␤␊ ␤␊┌┌" 
 ┬␤▒├ ├␤␊ ␤␊┌┌


In general, it's not safe to output arbitrary text that might include binary data to your terminal. It could include terminal escapes and the like.

You can add this to the pipeline to remove everything but printable ascii characters:

somecommand | tr -cd '\11\12\15\40-\176'

Need Your Help

Storing XML data for use with an addin

xml outlook add-in application-settings

I am in the process of creating an outlook addin. The addin works sort of like an aggregator. In this addin, the user will need to specify multiple sets of account information for the addin to ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.