help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with editing/decoding utf-8 text


From: Oliver Scholz
Subject: Re: problem with editing/decoding utf-8 text
Date: Tue, 27 May 2003 13:05:22 +0200
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt)

Fery <address@hidden> writes:
[...]
>> >> 1. Cannot I tell to a buffer (after the load of a file) that interpet it
>> >> as binary, and save exactly the same bytes what it did read into the
>> >> buffer (i.e. transparent buffer)?
>> >
>> > It's not a good idea.  The buffer contents might already be munged at
>> > that point.
>
> I know, I know, but I am the user, I should know if it is safe... :)
>
>> Maybe the OP wants to visit files with `M-x find-file-literally'?
>
> Yes, this is what I wanted originally. :) But, without the existence of
> a 'literal keyboard' it doesn't help _so_ much (although, I can edit the
> non-utf-8 part of the file)...
[...]

I can not parse this. Maybe there's a misunderstanding here?

When you hit a non-ascii key (like "ö" on a German keyboard), then
Emacs inserts the 8bit code for ö in the ISO 8859-1 character encoding
scheme (normally). This would be the octal code 366.

[Note: This applies only to unibyte buffers. A buffer visiting a file
with `find-file-literally' is a unibyte buffer.]

What else do you want? Be aware that Emacs doesn't display this as
some octal escape sequence (or some such) but as the actual glyph "ö".

[If you think this latter thing is bad, then you are not the only one
and I could post some Elisp code, which remedies this.]

Note, however, that the 8bit codes from the right hand part of the
Latin 1 CES are *not* allowed octetts in UTF-8. So inserting an ö will
break your UTF-8 encoding. So maybe you want -- on the contrary --
Emacs to insert the correct UTF-8 octetts corresponding to the
character on you keyboard (which is definitely not "literally")?

    Oliver
-- 
8 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]