all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonrumney@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Understanding how to specify UTF-8
Date: Fri, 21 Apr 2017 02:28:45 -0700 (PDT)	[thread overview]
Message-ID: <a0872788-6d81-4757-b020-fca1f7420d56@googlegroups.com> (raw)
In-Reply-To: <ekqmhrF71umU1@mid.individual.net>

On Saturday, 8 April 2017 07:43:58 UTC+8, 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.

The first only sets the default coding system for Files.

The second sets it for for everything, including system clipboard, file names, process I/O ...

On modern GNU/Linux, Mac or other Posix based OS's, you probably want everything in UTF-8, so the latter is correct. 

On Windows, the system itself does not support UTF-8 fully, so the former is safer. For clipboard and file names on Windows, the latest versions of Emacs will use Unicode regardless of what you specify for the coding system, it is really only process I/O that is the problem - Cygwin and Mingw apps may support UTF-8 I/O, but native Windows apps (including the cmd.exe shell) can have severe difficulties with it.



  parent reply	other threads:[~2017-04-21  9:28 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
2017-04-21  9:28 ` Jason Rumney [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0872788-6d81-4757-b020-fca1f7420d56@googlegroups.com \
    --to=jasonrumney@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.