Printing a binary file by accident leaves some terminals unreadable, and closing the tab is not the only fix.
reset
stty sane
reset reinitializes the terminal and clears the screen. stty sane only restores the line settings such as echo and line endings. Type the command blind if you cannot see what you type, and press Ctrl+J instead of Enter, because Enter may no longer work on a garbled terminal. If the problem repeats with one program, run it through cat -v or strings rather than printing raw bytes.
Further reading: reset manual page