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

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

Re: replacing characters and whacky trans-buffer conversion


From: Peter Dyballa
Subject: Re: replacing characters and whacky trans-buffer conversion
Date: Fri, 9 Mar 2007 17:13:16 +0100


Am 09.03.2007 um 16:54 schrieb ken:

Much of what I do entails copying & yanking
text into an existing emacs buffer.  I might do this a number of times
into the same file and each of the coding types of the insertions might be different. If there were one particular encoding type in emacs which would display all possible other encoding types properly and allow me to
edit that file, I would try that and maybe even change all my files to
that.  But I doubt that capability exists (or ever will in my current
lifetime).

There definitely is! I have test files encoded in 20 or 30 encodings (ISO 8859, some Mac, Adobe PostScript, NeXT, UTF-8, some MS Windows). In Mac OS X for example, without GNOME, it works without flaw to copy&paste between buffers of the same Emacs, between X clients, and between X and Aqua (Apple's "Display PDF" windowing system) clients – provided one thing: the contents you paste into some buffer fits into this buffer's encoding! Otherwise you get empty boxes ...


GNU Emacs uses internally a particular encoding for text. Depending on the coding system you have chosen (by default or deliberately) you can get different presentations of the same content. A problem are Mac, NeXT, and MS encodings: they use the area of 8 bit control characters (U+0080...U+009F) to encode "real" characters. So they have 32 entities more than the more useful ISO Latin (ISO 8859-x) encodings. Copying from them and pasting into ISO Latin buffers can easily fail because many of these "proprietary" characters cannot be found in ISO Latin. For example EN or EM DASH, DOUBLE QUOTATION MARKs ...


UTF-8 or the iso-2022-x encodings offer some kind of 'one encoding fits all' ...

--
Greetings

  Pete

Eat the rich – the poor are tough and stringy.






reply via email to

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