From: Will Parsons <wbp@nodomain.invalid>
To: help-gnu-emacs@gnu.org
Subject: Re: Understanding how to specify UTF-8
Date: 14 Apr 2017 23:37:16 GMT [thread overview]
Message-ID: <eld4pcFqavrU1@mid.individual.net> (raw)
In-Reply-To: ocn17208ke@news4.newsguy.com
B. T. Raven wrote:
> Hi Will. I decided to respond because of this observation in the latest
> posting:
> "They used to say emacs and vi are religions; these days they are
> starting to seem like latin."
Not completely - "Emacs" should be spelt "Emax" first ;)
(And the plural, I suppose should be "emaces" rather than "emacsen".)
> On 4/7/2017 18:43, Will Parsons wrote:
>> I want to always use Unicode/UTF-8 unless otherwise specified. I've noticed
>> that I've attempted to do this in my .emacs file in two separate ways on two
>> separate platforms:
>>
>> 1) (setq-default buffer-file-coding-system 'utf-8-unix)
>>
>> 2) (set-language-environment "UTF-8")
>>
>> Both seem to work, but I'm wondering if there are subtle differences between
>> the two that I should be aware of.
>
> I can't help with any subtlties but can only recommend that you add this
> cookie to the beginning of the buffer:
>
> ;; -*- coding: utf-8 -*-
Yes, I've employed that too. (Incidentally, I've been programming a lot in
Ruby for some years now, and I was surprised to find that after inserting a
copyright symbol (©) into one of my Ruby source files, that Emacs ruby-mode
inserted a line containing '# coding: utf-8' at the top when the file was
saved.)
> I think it may be enough to save and reload the file into a new buffer
> before adding exotic characters.
> I also have these lines in my .emacs:
>
> (set-locale-environment "utf-8")
> (set-language-environment 'utf-8)
> (set-default-coding-systems 'utf-8)
> (setq file-name-coding-system 'utf-8)
> (setq buffer-file-coding-system 'utf-8)
> (setq coding-system-for-write 'utf-8)
> (set-keyboard-coding-system 'utf-8)
> (set-terminal-coding-system 'utf-8)
> (prefer-coding-system 'utf-8)
> ;; (set-buffer-process-coding-system 'utf-8 'utf-8)
> (modify-coding-system-alist 'process
> "[cC][mM][dD][pP][rR][oO][xX][yY]" 'utf-8-dos)
>
> The line commented out caused a problem but I don't remember what it
> was. My os w64 vers. 7
Wow. I should think that should cover all possibilities. I prefer to be a
bit more minimalist than that though...
Anyway, thanks - Vale Edwarde!
--
Will
next prev parent reply other threads:[~2017-04-14 23:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 23:43 Understanding how to specify UTF-8 Will Parsons
2017-04-08 7:29 ` Eli Zaretskii
2017-04-13 5:09 ` B. T. Raven
2017-04-13 6:37 ` (unknown) Eli Zaretskii
2017-04-13 7:18 ` Understanding how to specify UTF-8 Eli Zaretskii
2017-04-13 9:42 ` hector
2017-04-14 23:37 ` Will Parsons [this message]
2017-04-21 9:28 ` Jason Rumney
2017-04-21 10:54 ` Eli Zaretskii
2017-04-21 17:36 ` Will Parsons
2017-05-29 15:16 ` Understanding cross version problem Francis Belliveau
2017-05-29 16:38 ` Drew Adams
2017-04-21 18:30 ` Understanding how to specify UTF-8 Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eld4pcFqavrU1@mid.individual.net \
--to=wbp@nodomain.invalid \
--cc=help-gnu-emacs@gnu.org \
--cc=wbparsons@cshore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).