[macemacsjp-english 628] Re: Opening UTF-8 text files

Zurück zum Archiv-Index

Peter Dyballa Peter_Dybal****@web*****
Wed Aug 16 22:19:30 JST 2006


Am 16.08.2006 um 14:06 schrieb Mahn-Soo Choi:

> FYI, I alwasy set
>
> (set-language-environment 'English)

Don't do this! This sets a 7 or 8 bit environment as default. I think  
it does not work to overcome this faulty setting later.

> (set-default-coding-systems 'utf-8-unix)

Instead of this tell Emacs that you have the environment variable  
LC_ALL or LANG set to some UTF-8 value. Use better

	(prefer-coding-system   'utf-8m)


Open CharacterPalette and choose ñ. You'll see that this ISO Latin-1  
character is UTF-8 encoded as the two octets C3 B1, being displayed  
or interpreted in an ISO Latin-1 character encoding as ñ!

You can teach Emacs a particular encoding using a first line with  
such a contents:

	-*- mode: Text; coding: iso-8859-16; -*-

or by using file (buffer) local variables like these at the end of  
the file:

%
% Local Variables:
% mode: LaTeX
% fill-column: 160
% coding-system: iso-latin-9
% End:
%
%%

Choose in both cases comment characters that suit the mode chosen!

--
Greetings

   Pete

A morning without coffee is like something without something else.






More information about the macemacsjp-english mailing list
Zurück zum Archiv-Index