From: W. Greenhouse <wgreenhouse@riseup.net>
To: help-gnu-emacs@gnu.org
Sent: Tuesday, March 12, 2013 9:32 AM
Subject: Re: File Encoding Issue on Windows
Hi,
Tech Stuff <
techstuff1971@yahoo.com> writes:
> Hi Peter,
>
> Thanks for taking the time to reply. Though it was useful, I'm still
> confused about how to resolve this issue. To be clear, when I posted
> yesterday, it was in emacs that I was seeing the extraneous
> characters, not in notepad. However I just opened it again in
> notepad to check on the encoding and now I'm seeing the extra
> characters there as well. So something must have changed when as
> part of trying to figure out what was going on, I saved the file in
> Emacs. Emacs seems to be the culprit. Is there something that I can
> put in my .emacs to tell it to save automatically in utf-8? Or am I
> maybe still not understanding things.
>
> Thanks
again.
>
> -ts1971
The following should unequivocally set utf-8 in all relevant contexts:
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
The above is tested by me only as far back as Emacs 23. On an unrelated
note, however, you should consider upgrading if you possibly can;
according to http://www.gnu.org/software/emacs/#Releases the newest
Emacs 22 is nearly 5 years old already.
--
Regards,
WGG