unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Trying to input Unicode via GNU Emacs 21.3.1
Date: Sat, 12 Feb 2005 14:29:48 +0100	[thread overview]
Message-ID: <829b69a91977297f238f652bca4d03da@Web.DE> (raw)
In-Reply-To: <74cf5544e5f816d57ce9bcb40de1cbc9@norvelle.org>


Am 11.02.2005 um 22:00 schrieb List account:

> For instance, I need to be able to display the typical accented 
> Spanish, Italian and French characters.  As an example, I can input 
> "Alarcón" in Emacs and it looks fine, but it displays in my browser 
> (Camino 0.82 on Mac OS X) as "Alarcón".  The odd thing is that I 
> basically copied and modified this text from a page that actually 
> works just fine.

Camino is not clever in guessing an HTML file's encoding: I can teach 
ten times and more the right encoding and when I return to that page 
it's again the default encoding from the preferences. So you should be 
not that stupid and start your HTML file this way:

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
   <!-- ... other things ... -->
</head>

Here all charset names are defined: 
http://www.iana.org/assignments/character-sets.

The two characters ó explain that, what you've typed in GNU Emacs was 
correctly encoded as UTF-8. Character Palette (in Mac OS X) tells me 
about ó that it is in UTF-8 "C3 B3", i.e. Ã followed by ³. Camino 
should be able to display these two characters, if you VIEW it in 
UTF-8, as one ó. Defining the charset used in the HTML source's header 
should Camino, and other browsers, make automatically switch to the 
correct character set -- and maybe you should have set the correct font 
that is Unicode!

>
> I have the following lines in my .emacs:
> (setq locale-coding-system 'utf-8)
> (set-terminal-coding-system 'utf-8)
> (set-keyboard-coding-system 'utf-8)
> (set-selection-coding-system 'utf-8)
> (prefer-coding-system 'utf-8)

It has been said a few times that this is too much, at least 
set-keyboard-coding-system is incorrect. Usually your keyboard will 
work in some Latin mode, i.e. produce only *one* character on hitting 
or releasing a key (UTF-8 is one, two, three, and I think even some 
more characters, for example in the case that you input a character 
from a right-to-left script in a left-to-right script environment, and 
vice versa). It might be more helpful when you set LANG to some 
(Spanish? French?) UTF-8 setting (man locale).

>
> I have also tried the technique of hitting [C-q] and entering the 
> Unicode string, but it chokes on the codes for accented characters and 
> instead of inserting the accented "a" character (0x00E1) by typing C-q 
> 0 0 E 1 it produces "^@e1".

As far as I know the C-q syntax supports only *octal* values. So the 
inputs ends when you input something outside the octal range of 0...7, 
e is that finishing item, RET another. So you see ASCII NUL, which is 
represented in Emacs as ^@, followed by e and 1, which are unchanged.

--
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-02-12 13:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 21:00 Trying to input Unicode via GNU Emacs 21.3.1 List account
2005-02-12 13:29 ` Peter Dyballa [this message]
     [not found] <mailman.1808.1108157331.2841.help-gnu-emacs@gnu.org>
2005-02-11 21:31 ` David Kastrup
2005-02-12  3:06   ` August
2005-02-12 16:15     ` August
2005-02-12 17:27       ` Erik Norvelle
2005-02-12 19:06         ` Peter Dyballa
     [not found]   ` <mailman.1838.1108178666.2841.help-gnu-emacs@gnu.org>
2005-02-12 10:47     ` David Kastrup
2005-02-14  1:35       ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=829b69a91977297f238f652bca4d03da@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).