From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: utf8 char display in buffer Date: Tue, 09 Jun 2009 20:34:47 -0500 Message-ID: <7I2dndeTy7sqkLLXnZ2dnUVZ_gmdnZ2d@sysmatrix.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1244598050 27964 80.91.229.12 (10 Jun 2009 01:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jun 2009 01:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 10 03:40:48 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MECo3-0001i0-W7 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jun 2009 03:40:48 +0200 Original-Received: from localhost ([127.0.0.1]:32913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MECo3-00034u-Dt for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jun 2009 21:40:47 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 09 Jun 2009 20:34:46 -0500 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 130 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.240 Original-X-Trace: sv3-ZUmOFO+I7KEiS8otKDByaS2HKE/TlKl86zrYwhfIZZBdxYhPteorx3ClPhK8NCK0tKYoqvfUntFexPC!ZDZcRGwb26prxI2ygAt5mzJRkbDRPHndlV63W29OlaFutpVEtu3mZJYr9YWA2K40q4rR/9XcztyT!EL+mai/+cxOrbQKbKxEypjsuURIfB9M= Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 6132 Original-Xref: news.stanford.edu gnu.emacs.help:169875 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65105 Archived-At: ken wrote: > On 06/09/2009 09:03 AM B. T. Raven wrote: >> ken wrote: >>> On 06/08/2009 04:43 PM B. T. Raven wrote: >>>> ken wrote: >>>>> .... >>>>> >>>> C-x ret C-\ latin-4-postfix >>>> >>>> then a,e,i,o,u followed by hyphen generate macroned vowels >>>> >>>> .... >>> Fantastic! But... when I save and close the buffer and then open it up >>> again, in place of the beautiful and correct characters, there are >>> little boxes. >> After you see then correctly in the buffer do: >> >> C-x ret c utf-8 >> >> then >> >> C-x C-s >> >> Now next time you load that file it should appear correctly. >> ā and ī are not in iso-8859-1 and so you must use a more comprehensive >> coding system. > > Hmmm... it doesn't. Doing everything just as you say above, I still get > the little boxes in place of the non-English characters. > > When after reloading the buffer, I run "describe-coding-system" on this > buffer, I get: > > ============================================= > Coding system for saving this buffer: > u -- mule-utf-8-unix > Default coding system (for new files): > u -- mule-utf-8 (alias: utf-8) > Coding system for keyboard input: > nil > Coding system for terminal output: > 0 -- iso-latin-9 (alias: iso-8859-15 latin-9 latin-0) > Defaults for subprocess I/O: > decoding: u -- mule-utf-8 (alias: utf-8) > encoding: u -- mule-utf-8 (alias: utf-8) > > Priority order for recognizing coding systems when reading files: > 1. mule-utf-8 (alias: utf-8) > 2. iso-latin-1 (alias: iso-8859-1 latin-1) > 3. iso-2022-jp (alias: junet) > 4. iso-2022-7bit > 5. iso-2022-7bit-lock (alias: iso-2022-int-1) > 6. iso-2022-8bit-ss2 > 7. emacs-mule > 8. raw-text > 9. japanese-shift-jis (alias: shift_jis sjis) > 10. chinese-big5 (alias: big5 cn-big5) > 11. no-conversion (alias: binary) > > Other coding systems cannot be distinguished automatically > from these, and therefore cannot be recognized automatically > with the present coding system priorities. > > The followings are decoded correctly but recognized as iso-2022-7bit-lock: > iso-2022-7bit-ss2 iso-2022-7bit-lock-ss2 iso-2022-cn iso-2022-cn-ext > iso-2022-jp-2 iso-2022-kr > > .... > ================================================================== > > I don't know... does utf-8 or mule-utf-8 contain latin-4, greek, and/or > German characters? (This file has some of each.) > > >>> I tried using ‘C-x C-m c utf-8 RET’ prior to 'C-x C-f filename'... but >>> no joy. Same no-go with 'C-x C-m c mule-utf-8 RET'. >>> >>> The fact that these non-English characters display properly in the >>> buffer initially tells me that I have the requisite fonts installed. So >>> what little connection is emacs not making (and how do I tell it to make >>> that connection)? >> If you use utf-8 a lot you can put ;; -*- coding: utf-8[;] -*- into the >> first line of the file. I don't know whether that sem in brackets is >> needed or not. > > Sorry, I should have mentioned that I have this (with the semi-colon) at > the top of the file. > > Let me also say that, though the little boxes appear in the emacs > buffer, the proper non-English characters appear when the file is loaded > into firefox. (Yeah, this emacs file is an HTML page.) > > > >>> Thanks, all. Don't know. Your problem has just escalated above my pay grade. I don't know what it means that the files display okay in FF. I just loaded my .emacs into the browser and it looks fine (has many exotic non Latin-1 characters in it). You are using GUI Emacs and not terminal, right. You could try these settings from my ver 22 .emacs, just for fun: (set-language-environment 'UTF-8) (set-default-coding-systems 'utf-8) (setq file-name-coding-system 'utf-8) (setq default-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) (set-clipboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (prefer-coding-system 'utf-8) (modify-coding-system-alist 'process "[cC][mM][dD][pP][rR][oO][xX][yY]" 'utf-8-dos) and try C-x ret c utf-8 C-x C-f to open the file. or install version 23.x w32 binary into a different directory from here http://alpha.gnu.org/gnu/emacs/pretest/windows/ I don't think you need a .emacs with ver 23 in dealing with utf-8 since its internal representation is unicode.