From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: how to work with utf-8 Date: Mon, 18 Apr 2005 01:00:29 +0200 Message-ID: <1948d86f2d7bbe8092bb8f78bcc0e8ba@Web.DE> References: <20050417221611.GA20478@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1113778802 31859 80.91.229.2 (17 Apr 2005 23:00:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Apr 2005 23:00:02 +0000 (UTC) Cc: emacs help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 18 01:00:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DNIk4-00040a-2n for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Apr 2005 00:59:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNImj-0001Px-LB for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Apr 2005 19:02:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DNIlm-0001Gn-87 for help-gnu-emacs@gnu.org; Sun, 17 Apr 2005 19:01:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DNIlg-0001DP-Aw for help-gnu-emacs@gnu.org; Sun, 17 Apr 2005 19:01:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNIlg-0001Cx-3s for help-gnu-emacs@gnu.org; Sun, 17 Apr 2005 19:01:32 -0400 Original-Received: from [217.72.192.224] (helo=smtp06.web.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DNIm5-0006GR-Jt for help-gnu-emacs@gnu.org; Sun, 17 Apr 2005 19:01:57 -0400 Original-Received: from [84.245.189.222] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.104 #268) id 1DNIke-0004nS-00; Mon, 18 Apr 2005 01:00:28 +0200 In-Reply-To: <20050417221611.GA20478@localhost.localdomain> Original-To: Paul Tremblay X-Mailer: Apple Mail (2.619.2) X-Sender: Peter_Dyballa@web.de 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:25760 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25760 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=20= example: LANG=3Dde_DE.UTF-8. Modern Emacsen, I think 21.3 at least,=20 derive their mode of operation from this. You can start your text files =E0 la: ;;; -*- mode: Text; coding: utf-8;=20= -*- Once you've done that you can C-x RET r:=20 revert-buffer-with-coding-system. And what you might need most are fontsets of fonts that allow you to=20 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=20 simultaneously pressing the alt key. But for the future I'd like to=20 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.