Terminal command line printing strange characters


Hello, I am taking cs50 through edx and was working on a problem set regarding ciphers. I had gotten a dumbed down version of the program to work but when I added in a modulo function, my terminal command line suddenly was typing out in strange characters. For example, ~/workspace/pset2 is appearing as ·/┬⎺⎼┐⎽⎻▒ce/⎻⎽e├2

Is there a reset or something similar I can do to get out of this mode? I’ve tried logging out and logging back in, and Control+C but those haven’t helped.

Thank you!


Have you tried opening a new terminal? New terminals should work correctly, you can open as many terminals as you like. Also could you please post the code sample that caused this so we can see what happened.


Oh thank you so much! I didn’t realize that was an option. And I had tried fixing the program before I realized the problem was in the terminal itself and I didn’t save the version that caused the problem :frowning:

Thanks again.


I too am having the same problem. Here is an image. On closing the terminal and opening a new one, the problem repeated. From what I can tell, it happens when some sub-32 characters are printed.


Actually, did some more testing. It seems to be character = 14