From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Understanding how to specify UTF-8 Date: Thu, 13 Apr 2017 00:09:51 -0500 Organization: NewsGuy - Unlimited Usenet $23.95 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1492060540 14416 195.159.176.226 (13 Apr 2017 05:15:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Apr 2017 05:15:40 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 13 07:15:27 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 1cyX6L-0003Tn-Md for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Apr 2017 07:15:25 +0200 Original-Received: from localhost ([::1]:47378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyX6P-0002JR-Fz for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Apr 2017 01:15:29 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news4 Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: pec6b106e3c19d2aca6e64303e2677194a0e396e966bc608b.newsdawg.com In-Reply-To: X-Received-Bytes: 2450 X-Received-Body-CRC: 2433950757 Original-Xref: usenet.stanford.edu gnu.emacs.help:219083 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:112758 Archived-At: 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." 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 -*- 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 Ed