I have used to pc for developing erlang program, one is mac os x 10.6, the other is mac os x 10.7.
In ".emacs"
file of both pc, it contain the following script
;;handle emacs utf-8 input
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
But when I input remark including Chinese characters in one pc and saved, and download to the other pc. The chinese characters can't be shown correctly. The same story for reverse operation.
I want to know how to check the current file's encoding type? Is there any command can do that?
I believe you're looking for buffer-file-coding-system
. M-x describe-variable
will tell you more about it, and you can set it by M-x eval-expression
and use (setq buffer-file-coding-system 'coding-system-i-want)
. That will set it for a single buffer; once you've got it working, you can add entries to file-coding-system-alist
to permanently set the option as you'd like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With