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:48:55 -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 1075298087 8026 80.91.224.253 (28 Jan 2004 13:54:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2004 13:54:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 28 14:54:37 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 1Alq9M-00089x-00 for ; Wed, 28 Jan 2004 14:54:36 +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 1Alq6t-00076b-Hv for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jan 2004 08:52:03 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Alq5J-0005re-Md for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:50:25 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Alq4Y-0004h5-8q for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:50:10 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Alq4V-0004bV-0W for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:49:35 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.24) id 1Alq3r-0003c1-TR for help-gnu-emacs@gnu.org; Wed, 28 Jan 2004 08:48:55 -0500 Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Jason Rumney on Wed, 28 Jan 2004 04:15:18) 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:16455 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16455 > > Btw, does anyone know of a tool that can show what's in the clipboard > > together with how the text is encoded there? > The standard Clipboard viewer should do that. At least on XP it has > Text, Locale, OEM Text and Unicode Text entries when text is copied > to the clipboard. I wanted something that will show me the Windows codepage and the Unicode codepoints of the characters; the standard clipboard viewer doesn't do that AFAICS (and you first need to find it, since M$ moved it out of sight for some reason ;-). I found ClipConvert and (its newer incarnation) Album that do what I wanted. They can also convert between encodings and CF_* formats, so it looks like there's another alternative for Paul Gorodyansky's page. > The locale can't be viewed, but it seems that Emacs might be able to > do something with that to get text that Emacs puts on the clipboard > in the right encoding. Yes. > But it cannot influence how other apps put text on the clipboard > (which AFAIK is always in the System locale, even if the characters > cannot be encoded in that). It seems like on Windows XP, the characters are implicitly converted to Unicode (by some internal Windows machinery), so Emacs can always win using CF_UNICODETEXT if it's available in the clipboard. Failing that, we can again use CF_LOCALE to determine the correct encoding with which to decode CF_TEXT text.