[Top][All Lists]

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

Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Ope

From: Karl Voit
Subject: Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region)
Date: Wed, 18 May 2016 17:53:51 +0200
User-agent: slrn/pre1.0.0-18 (Linux)

* <> <> wrote:
> On Wed, May 18, 2016 at 02:13:52PM +0200, Karl Voit wrote:
>> * Yuri Khan <> wrote:
>> > On Wed, May 18, 2016 at 5:07 PM, Karl Voit <> wrote:
>> >
>> >> When I paste text from a Windows application to my Emacs (running
>> >> mainly Org-mode), I get wrong charset.
>> >>
>> >> For correcting such wrong character sets, I want to write a function
>> >> that corrects the charset.
>> >
>> > I cannot help with your needs, 
>> That's OK.
>> Besides the good points regarding charset below, I still need to
>> search&replace some things on the yanked region.
>> > but you should not have to jump through
>> > hoops just to get text encoding right, as long as the originating
>> > application puts Unicode text on clipboard. (And I’m pretty convinced
>> > Outlook does.)
>> How can I test this?
> I know very little about Windows these days. But the documentation
> for the variables "selection-coding-system" and 

| selection-coding-system is a variable defined in `select.el'.
| Its value is iso-latin-1-dos
| Original value was nil

I once set this to 'utf-8 in my init.el. The Emacs help further
suggests setting it to 'utf-16le-dos instead when running on
Windows. With switching to this setting, the clipboard gets yanked
properly! :-)

> "x-select-request-type" might contain relevant information. 

... seems legit.

Great, that solves the charset issue.

Thanks very much! :-)

Can you still show me how I yank and operate (string-replace) only
on the yanked text?

All in all, one of the most disturbing things today is the definitive
fact that the NSA, GCHQ, and many more government organizations are
massively terrorizing the freedom of us and the next generations.

reply via email to

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