If a program/script outputs lots of binary data to screen, the whole terminal session becomes scrambled

Bug #49058 reported by Chris Wagner
2
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Invalid
Low
Unassigned

Bug Description

I'll attach a script that reveals this bug. As long as the script works (i.e., it reveals the bug), you will see what I mean.

I am seeing this in Dapper. I've seen it before, perhaps in Breezy, but I didn't bother to try to reproduce it, at that point. I suspect it's in all versions of Ubuntu.

Revision history for this message
Chris Wagner (chris-wagner) wrote : Script to reveal this bug

Run this Python script to reveal the bug

Changed in gnome-terminal:
importance: Untriaged → Low
Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 49058] If a program/script outputs lots of binary data to screen, the whole terminal session becomes scrambled

 status Rejected

Then that binary data contains ansi escape sequences shich the terminal
reacts to. This is normal, you shouldn't output binary data to a
terminal.

Changed in gnome-terminal:
status: Unconfirmed → Rejected
Revision history for this message
Chris Wagner (chris-wagner) wrote :

Which ANSI escape sequences tell the terminal to garble its content, tell it to switch encoding, or might cause such a phenomenon?

Did you try the script? It garbles even the prompt (e.g., "chris@my-computer:~$"). Checking the "Terminal -> Set Character Encoding" menu reveals that the encoding is the same, before and after the garble: UTF-8.

Revision history for this message
Simon Law (sfllaw) wrote :

This is normal.

You can fix it by typing:
echo <C-v><C-o>

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 49058] Re: If a program/script outputs lots of binary data to screen, the whole terminal session becomes scrambled

There are sequences to change the prompt to whatever data follows next
(which in the case of binary data is unreadable binary data).

Revision history for this message
Chris Wagner (chris-wagner) wrote :

Gotcha. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.