|
From: | B. T. Raven |
Subject: | Re: utf8 char display in buffer |
Date: | Tue, 09 Jun 2009 08:03:57 -0500 |
User-agent: | Thunderbird 2.0.0.21 (Windows/20090302) |
ken wrote:
On 06/08/2009 04:43 PM B. T. Raven wrote:ken wrote:Hey, group, I already use a few utf8 characters in emacs (and in web pages), but recently needed to use a couple more. One is an 'a' with a horizontal line above it, the other an 'i' with a horizontal line above it. How do I input these into a buffer? tia, kenC-x ret C-\ latin-4-postfix then a,e,i,o,u followed by hyphen generate macroned vowels If you don't want all these then you could just put something like this in .emacs (global-set-key "\C-ca" (lambda () (interactive) (insert ?ā ))) (global-set-key "\C-ci" (lambda () (interactive) (insert ?ī ))) assuming you have these C-c combos free. EdFantastic! 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.
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.
Thanks, all.
[Prev in Thread] | Current Thread | [Next in Thread] |