When i run a compile instruction from the shell/eshell/term in emacs , the names of the variables appear weird in the shell .
Here is a sample code (with some random error) and the output when I compile :
#include iostream
#include cstdlib
int main (void)
{
cscdsd ;//some random error
return ;
}
//shell o/p:
g++ new.cc
new.cc: In function â\200\230int main()â\200\231:
new.cc:7: error: â\200\230cscdsdâ\200\231 was not declared in this scope
new.cc:8: error: return-statement with no value, in function returning â\200\230intâ\200\231
~/codes $
What i have figured out is that \200\230 and \200\231 mean the start and end of a variable or function name .
Any ideas what this happens or how to get rid of it ?
\200is an octal escape sequence. In hex,â\200\230isE2 80 98, which is how U+2018 (LEFT SINGLE QUOTATION MARK) is encoded in UTF-8. Likewise,â\200\231is U+2019 (RIGHT SINGLE QUOTATION MARK). This is what happens wheng++emits UTF-8 and Emacs interprets it as ISO-8859-1.You probably need to set
default-process-coding-systemto a different value. Try (in your ~/.emacs):There are other ways to tell Emacs what coding system to expect. Read the documentation for the variables
default-process-coding-system&process-coding-system-alistand the functionsuniversal-coding-system-argument&set-buffer-process-coding-system.