[Top][All Lists]

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

Re: Copying and pasting Cyrillic text between Emacs and other apps

From: Eli Zaretskii
Subject: Re: Copying and pasting Cyrillic text between Emacs and other apps
Date: Wed, 28 Jan 2004 08:36:39 -0500

> > 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

> 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...

reply via email to

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