This problem occurs because of the odd or old terminal line settings. The stty tool on Unix can help you reset them.
I have had the same issue on Iterm2 on Mac and got it fixed using it.
stty sane
This command fixes terminal oddities by resetting them to reasonable defaults.
Look at man stty or this good read for more info.