From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Copying and pasting Cyrillic text between Emacs and other apps Date: Wed, 28 Jan 2004 08:36:39 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <36b165a.0401271516.c68fa38@posting.google.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1075297510 6715 80.91.224.253 (28 Jan 2004 13:45:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2004 13:45:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 28 14:44:58 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Alq02-0007Va-00 for ; Wed, 28 Jan 2004 14:44:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Alpzn-0001Gg-VG for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jan 2004 08:44:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlpwJ-0000D0-H6 for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:41:07 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Alptz-00083C-NU for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:39:16 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Alpsc-0007Ri-Jr for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:37:18 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.24) id 1Alprz-0003QR-FV for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:36:39 -0500 Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Jason Rumney on Wed, 28 Jan 2004 04:00:41) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:16453 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16453 > > What is it that Emacs doesn't do right here? > > Emacs doesn't use UNICODE_TEXT format. Maybe it should, but we have > to detect if it is available somehow The MSDN docs says that the function IsClipboardFormatAvailable can be used to see if CF_UNICODETEXT is supported. Can Emacs use that function? > since blindly using it will cause other apps to see nothing on the > clipboard. It seems like the recommended practice is to put the text into the clipboard several times in different formats, with the more powerful formats first. Windows applications are supposed to walk the list of available data formats and use the first one they support. So Emacs could put a CF_UNICODETEXT object, then the CF_TEXT object into the clipboard, and the Windows apps will then use the Unicode encoding if they can, else the system page encoded text. When getting text from the clipboard, Emacs should try CF_UNICODETEXT first, if it's present in the clipboard (EnumClipboardFormats could be used to check that). Of course, this means the effect of "C-x RET x" and "C-x RET X" on Windows should be rethought...