From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region) Date: Wed, 18 May 2016 21:14:13 +0300 Message-ID: <83posj2pze.fsf@gnu.org> References: <2016-05-18T13-02-10@devnull.Karl-Voit.at> <2016-05-18T14-10-52@devnull.Karl-Voit.at> <20160518123117.GA13317@tuxteam.de> <2016-05-18T17-35-17@devnull.Karl-Voit.at> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1463595332 6603 80.91.229.3 (18 May 2016 18:15:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 18:15:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 18 20:15:13 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b3600-0005XV-Kr for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 20:15:12 +0200 Original-Received: from localhost ([::1]:46468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b35zw-00027D-Q3 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 14:15:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b35zL-0001vA-Gb for help-gnu-emacs@gnu.org; Wed, 18 May 2016 14:14:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b35zG-0001go-8b for help-gnu-emacs@gnu.org; Wed, 18 May 2016 14:14:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b35zG-0001gh-54 for help-gnu-emacs@gnu.org; Wed, 18 May 2016 14:14:26 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4793 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b35zD-0001XA-VE for help-gnu-emacs@gnu.org; Wed, 18 May 2016 14:14:25 -0400 In-reply-to: <2016-05-18T17-35-17@devnull.Karl-Voit.at> (message from Karl Voit on Wed, 18 May 2016 17:53:51 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110055 Archived-At: > From: Karl Voit > Date: Wed, 18 May 2016 17:53:51 +0200 > > ,---- > | 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! :-) You shouldn't set selection-coding-system to any value on MS-Windows, just leave it alone. It will work regardless. Setting it to anything is asking for trouble, as it forces Emacs to use that encoding instead of using UTF-16 when available in the clipboard. > Can you still show me how I yank and operate (string-replace) only > on the yanked text? Turn on transient-mark-mode, I think.