From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan 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 19:25:38 +0600 Message-ID: References: <2016-05-18T13-02-10@devnull.Karl-Voit.at> <2016-05-18T14-10-52@devnull.Karl-Voit.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1463578270 7383 80.91.229.3 (18 May 2016 13:31:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 13:31:10 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Karl Voit Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 18 15:31:05 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 1b31Z1-000465-TM for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 15:31:04 +0200 Original-Received: from localhost ([::1]:45022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b31Z1-0008Ng-2W for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 09:31:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b31U9-0005dq-1j for help-gnu-emacs@gnu.org; Wed, 18 May 2016 09:26:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b31U7-0004Rd-2h for help-gnu-emacs@gnu.org; Wed, 18 May 2016 09:25:59 -0400 Original-Received: from mail-vk0-x242.google.com ([2607:f8b0:400c:c05::242]:35526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b31U6-0004RZ-Uz for help-gnu-emacs@gnu.org; Wed, 18 May 2016 09:25:59 -0400 Original-Received: by mail-vk0-x242.google.com with SMTP id e126so7033619vkb.2 for ; Wed, 18 May 2016 06:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=xf2Na6Ui8NoXSzFJ6Uh/c45JRMD+5TT7l/8IPoF4WhU=; b=0vSaNYV0gTDPsNkQTxFyE7f0KMFkIk4WlmU1soCHOTP+fSIyavQoanqRAou0Ij2DIo 1vH+Sl67EhZCKYOlFnaSS8jcxZm1P6e0j9pT0WB1XXYVYZ6VElpFqCXd3OqeqGinvVlp UYsJFYMtrHigobwtvCozLkTeVmuYPqUVY64J7e8xRKaOw0uwmw0CsPz3YozHabrKCGgA uPbFouW/4ZxS1NjkOICwSIVtW0rx4o0NNvHLYpW48MKHYPVASBi8+GoSzVeW7UsVb7Ze rXgUgQ6kIT+Lo7y20eM+ZJqmvu57/PHYCVZTgqLrnp+0QStUCMV5L6q60ZQ75t5Zdo1d rDog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=xf2Na6Ui8NoXSzFJ6Uh/c45JRMD+5TT7l/8IPoF4WhU=; b=Ovo0QnM9Kf8kCHf8WIr8I0RE72jqBUbXvhpGczHIDNfGuKbu0xLgMMTpBbYPTvdZwT iZVMceIPpTymOqN7fL0slk0fEDsOvz4vWRBPp4UQbXy/W8aDF74yTSdBWMYBXjXo0h9f CZ97xmXlyg3Te4aQWx6LqofGhakb58P9gHyZy2ksG1+btVHs06CmH2NVJmQxloVMiVUM 7+lgqkneVZKv9jPn9Qgkrb+M+jNQTGrcfZv5IE93IbA28zJcegvRHx4JoX5tV7WUb5oD eGZ0+sPI5w1qWstmESZyP1cNOX7JSaxGatt9yyC0FdEi635SeThSGNR1TZ/P2JGZ3IRx ztRQ== X-Gm-Message-State: AOPr4FW9rmMlW2hhzXul3rI+vwz1GaqrHIknTVx/ZPbbgwF8DJoVx60eR9YOb319Sla03vE0PfZq1f3kUYPvpw== X-Received: by 10.31.221.68 with SMTP id u65mr3955788vkg.25.1463577958475; Wed, 18 May 2016 06:25:58 -0700 (PDT) Original-Received: by 10.176.1.9 with HTTP; Wed, 18 May 2016 06:25:38 -0700 (PDT) In-Reply-To: <2016-05-18T14-10-52@devnull.Karl-Voit.at> X-Google-Sender-Auth: m9BuH_Q49Ajp9HufD4DM2Fr-MwA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::242 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:110049 Archived-At: On Wed, May 18, 2016 at 6:13 PM, Karl Voit wrote: >> 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=E2=80=99m pretty conv= inced >> Outlook does.) > > How can I test this? Something like this (Note: Little Programs do little to no error checking): #include #include int main() { UINT format =3D 0; OpenClipboard(0); do { format =3D EnumClipboardFormats(format); printf("%d\n", format); } while (format); CloseClipboard(); } Unicode text is format 13. ANSI text is format 1. OEM text is format 7. Formats are enumerated in decreasing order of preference, i.e. most faithful representation first.