I have a shell command I'm running from Emacs that has a Δ character in its output. How can I configure the
*Shell Command Output* buffer to display UTF-8 by default?
You can use the per-command setting of the encoding that @choroba mentions in his comment (
C-x RET c utf-8) which will only affect the next command, but you can also set UTF-8 to be the default encoding everywhere. Add
to your init file and restart emacs. Or for the current session, click on "Options/Multilingual Environment/Set Language Environment" and select "UTF-8".
Unless you have very specific needs (CJK characters with special encodings, Microsoft Code Page stuff etc), I believe that UTF-8 is safe: I have never regretted setting it globally, but I cannot guarantee that you will not run into problems. IME, the problems tend to be few and far-between and have to do with the special encodings I mentioned (and in those cases, you can use the one-off setting of the encoding to deal with the problem).
But you might want to wait for other opinions before switching over wholesale, and in the meantime deal with the problem one case at a time, using the
C-x RET c utf-8 method for each command.