when executing "M-x compile" (which executes "make") and I have an error in
my sources emacs shows i.e. the following in the compilation temporary
buffer:
...
pingpong.cpp: In function \342\200\230int main(int, char**)\342\200\231:
pingpong.cpp:51: error: expected `;' before \342\200\230}\242\200\231 token
...
I am disturbed by the \xxx\yyy\zzz characters. I figured something is wrong
with my locale settings - I just don't know which screw to tighten.
locales are set to "en_GB.UTF-8" (LANG, LC_*), the source file in utf-8
encoding. Any ideas?
Thanks,
Uwe
--
One picture is worth more than ten thousand words.
-- Chinese proverb
Hmm. The English proverb is "A picture is worth a thousand words". By simple
arithmetic, a Chinese picture is worth more than ten English pictures ;-).
More megapixels perhaps.
Does it help if you type "C-x RET c utf-8 RET" immediately before
invoking "M-x compile"?
> Does it help if you type "C-x RET c utf-8 RET" immediately before
> invoking "M-x compile"?
yes! That does the trick.
I did some experimens with what I found on google
(http://www.gnu.org/software/emacs/manual/html_node/Specify-Coding.html),
but changing any of the variables did not work. Specifically
set-buffer-process-coding-system (interactive) requires 1. process, 2.
encoding, but only accepts an incoding as first input (?!).
Changing LC_ALL to "C" does the trick, too. :/
Ciao
Uwe
--
He's dead, Jim.
What happens if you say "M-x prefer-coding-system RET utf-8 RET" --
does Emacs display output from "M-x compile" correctly then?
> Changing LC_ALL to "C" does the trick, too. :/
I have only set LC_CTYPE and LANG to be "de_DE.UTF-8" and do not do
'set-language-environment' in .emacs, and most of my buffers are
UTF-8 encoded.
--
Mit friedvollen Grüßen
Pete
Alle reden vom Wetter - die Bahn fährt nicht.
> What happens if you say "M-x prefer-coding-system RET utf-8 RET" --
> does Emacs display output from "M-x compile" correctly then?
That did the trick. Adding
(prefer-coding-system 'utf-8)
to the .emacs solved the problem.
Thanks for all the replies!
Ciao
Uwe
--
Only those who leisurely approach that which the masses are busy about
can be busy about that which the masses take leisurely.
-- Lao Tsu
(selectively-snipped-or-not-p)
No, but some chinese characters take atleast 10 english words to express their
true meaning, and some a lifetime of study. ;-)
Cor
--
I do not use Windows (tm) therefore I do not fear mail from strangers
If everything else failed to satisfy you, try reading The Frign' Manual
(defvar My-Computer '((OS . "GNU/Emacs") (IPL . "GNU/Linux")))
http://www.clsnet.nl
Are using the CVS version of Emacs 22? The OP used 21.x, IIRC.
>> I have only set LC_CTYPE and LANG to be "de_DE.UTF-8" and do not do
>> 'set-language-environment' in .emacs, and most of my buffers are
>> UTF-8 encoded.
>
> Are using the CVS version of Emacs 22? The OP used 21.x, IIRC.
This one and 23.0.0, but 21.3.50-20041117 works the same (21.4 is not
yet available from Fink for Mac OS X, only 22 in the modern
department, so I'm not using it).
--
Greetings
Pete
Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.
These both are from CVS (21.3.50-20041117 is from before it was
decided that the next release will be 22.1). The OP used a released
21.x version, which includes none of the enhancements to text
decoding.