From: "B. T. Raven" <ecinmn@peoplepc.com>
Subject: Re: two utf-8 questions
Date: Sun, 05 Feb 2006 18:12:33 GMT [thread overview]
Message-ID: <lerFf.6472$Nv2.6217@newsread1.news.atl.earthlink.net> (raw)
In-Reply-To: 87slr0kp0b.fsf-monnier+gnu.emacs.help@gnu.org
"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message
news:87slr0kp0b.fsf-monnier+gnu.emacs.help@gnu.org...
> > 1)
> > Even though the following is in my .emacs:
>
> > (setq default-buffer-file-coding-system 'utf-8)
>
> > when I type 'C-x ret f' I see the prompt:
>
> > Coding system for visited file (default, nil) instead of (default,
utf-8)
>
> I think it never said anything else than nil.
Then it appears that there is no way to set the default (at least on my
w32 build, GNU Emacs 21.3.1 (i386-mingw-windows98.2222) of 2004-03-10 on
NYAUMO)
>
> > There are contexts where I need to specify utf-8 here, or else the
file
> > won't be saved in the correct format. This seems to be true even if
the
> > file header ;; -*- coding: utf-8 -*- is present. Why is this?
>
> This varies a lot between different versions of Emacs (because it's
still
> being continuously improved). Also it depends on many more details.
> So it's hard to give a useful answer without knowing the version of
Emacs
> you're using, the locale under which you're running, how much you've
munged
> the default Mule setup, and then how you've loaded the file, what
operations
> you've done in between and which command gave you the above problem.
>
> As for obeying the `coding' tag when saving: this has only been added as
> a new feature recently in Emacs-CVS. In earlier code, the `coding' tag
is
> only used when opening a file (and it's checked for consistency when
> saving).
>
>
> Stefan
As far as I know, these are the only settings in my .emacs that might have
munged the default setup:
(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 'iso-8859-1)
(set-selection-coding-system 'iso-8859-1)
(prefer-coding-system 'utf-8)
(modify-coding-system-alist 'process
"[cC][mM][dD][pP][rR][oO][xX][yY]" 'utf-8-dos)
and via custom:
'(current-language-environment "UTF-8") ;; may be synonymous with
set-language-environment above
'(unify-8859-on-encoding-mode t nil (ucs-tables))
Apparently the clipboard and selection coding systems affect the
locale-coding-system value which shows as iso-8859-1. Still, a buffer that
correctly shows unicode glyphs and which has -u in the mode line should be
saved with the utf-8 encoding. When I issue C-x C-s, C-x k, and then C-x
C-f with the same file name, the utf-8 encoding has been lost. I would be
satisfied with a setup which could handle only the utf-8 encoding if that
were possible by updating some of my *.el files without installing the
newer CVS binaries. But I suppose that's not advisable. Thanks for your
input anyway.
Ed
next prev parent reply other threads:[~2006-02-05 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-28 19:30 two utf-8 questions B. T. Raven
2006-01-28 23:13 ` Peter Dyballa
[not found] ` <mailman.81.1138502554.3044.help-gnu-emacs@gnu.org>
2006-01-29 5:06 ` B. T. Raven
2006-01-29 10:00 ` Peter Dyballa
2006-01-29 9:50 ` François Gannaz
2006-02-03 23:39 ` Stefan Monnier
2006-02-05 18:12 ` B. T. Raven [this message]
2006-02-06 4:14 ` 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='lerFf.6472$Nv2.6217@newsread1.news.atl.earthlink.net' \
--to=ecinmn@peoplepc.com \
/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.