From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Understanding how to specify UTF-8 Date: Sat, 08 Apr 2017 10:29:58 +0300 Message-ID: <83tw5zmk5l.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1491636636 24073 195.159.176.226 (8 Apr 2017 07:30:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Apr 2017 07:30:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 08 09:30:32 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkpE-000509-KX for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Apr 2017 09:30:24 +0200 Original-Received: from localhost ([::1]:53809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwkpH-0008D3-GQ for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Apr 2017 03:30:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwkol-0008Cu-SI for help-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:29:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwkog-0007jU-Ud for help-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:29:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwkog-0007jQ-RE for help-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:29:50 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1536 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cwkof-0004Vz-B7 for help-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:29:50 -0400 In-reply-to: (message from Will Parsons on 7 Apr 2017 23:43:55 GMT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112723 Archived-At: > From: Will Parsons > Date: 7 Apr 2017 23:43:55 GMT > > I want to always use Unicode/UTF-8 unless otherwise specified. This doesn't tell what exactly do you want to happen. The above basically says "I want to use UTF-8 except when I don't", and doesn't say a word about those "I don't" cases. So please elaborate to make the responses more accurate and correct. For example, what about files you edit that were encoded in something other than UTF-8 before? what about responding to email encoded in something other than UTF-8? etc. etc. > 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 second one is better, as it leaves Emacs more leeway where UTF-8 might not be appropriate. But it's difficult to know what to tell without the additional information.