Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange characters in ansi-term in emacs

I wrote a c++ program and when I compiled it using g++ in ansi-term, I got some strange characters displayed:

enter image description here

If required, the error was that i hadn't declared the variable n. How can I correct this?

like image 572
sudeepdino008 Avatar asked Nov 19 '25 01:11

sudeepdino008


1 Answers

Ah! Tested this...

 (setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8-unix)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

and problem solved!!!

like image 59
sudeepdino008 Avatar answered Nov 22 '25 02:11

sudeepdino008



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!