all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: emacs help <help-gnu-emacs@gnu.org>
Subject: Re: how to work with utf-8
Date: Mon, 18 Apr 2005 01:00:29 +0200	[thread overview]
Message-ID: <1948d86f2d7bbe8092bb8f78bcc0e8ba@Web.DE> (raw)
In-Reply-To: <20050417221611.GA20478@localhost.localdomain>


Am 18.04.2005 um 00:16 schrieb Paul Tremblay:

> 1. Is there an easier way to open a utf-8 file than with:
>
> C-x C-m c utf-8 C-x C-f ?
>
> For example, what if I want to create a new utf-8 file from scratch?

You can set these things in .emacs:

	(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)
	(set-language-environment		'German)
	(prefer-coding-system			'iso-8859-15)
	(modify-coding-system-alist 'process "\\*shell\\*\\'" 'utf-8-unix)

and/or set locales like LC_ALL, LC_CTYPE, LANG to contain UTF-8 as for 
example: LANG=de_DE.UTF-8. Modern Emacsen, I think 21.3 at least, 
derive their mode of operation from this.

You can start your text files à la: ;;; -*- mode: Text; coding: utf-8; 
-*-
Once you've done that you can C-x RET r: 
revert-buffer-with-coding-system.

And what you might need most are fontsets of fonts that allow you to 
see these glyphs.


>
> 2. How do I enter utf-8 characters directly in emacs? In vim, there is
> a serier of sequences to do this: control k, and then u to indicate a
> hexidecimal that has a width of 4, and then something like 201c for a
> right curly quote.
>

Happily I can input these with my keyboard, either directly or with 
simultaneously pressing the alt key. But for the future I'd like to 
know a more general method too ...

--
Greetings

   Pete

   Basic, n.:
	A programming language.  Related to certain social diseases in
that those who have it will not admit it in polite company.

      reply	other threads:[~2005-04-17 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 22:16 how to work with utf-8 Paul Tremblay
2005-04-17 23:00 ` Peter Dyballa [this message]

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=1948d86f2d7bbe8092bb8f78bcc0e8ba@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.