emacs-devel
[Top][All Lists]
Advanced

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

Re: [Patch] Unicode support for the MS Windows clipboard


From: Eli Zaretskii
Subject: Re: [Patch] Unicode support for the MS Windows clipboard
Date: Thu, 27 May 2004 10:05:22 +0200

> From: Benjamin Riefenstahl <address@hidden>
> Date: Wed, 26 May 2004 20:01:22 +0200
> 
> As we just had another discussion on this, I sat down and wrote a
> preliminary implementation of Unicode support for the MS Windows
> clipboard, see attached patch.

Thanks!

> - Introduce a new variable `w32-clipboard-type' to use with
>   cut-and-paste instead of the hard-coded CF_TEXT.  The default for
>   `w32-clipboard-type' is CF_TEXT, because CF_UNICODETEXT is not
>   compatible with 9x/Me, it uses more memory and CF_TEXT was used
>   before.

Couldn't this be done without introducing Windows-specific options?
AFAIK, the logic employed by Windows when it encodes clipboard text is
quite simple, something like: if it cannot be encoded with the system
codepage, use Unicode.  Why cannot Emacs simply follow this logic?

Also, AFAIK CF_UNICODETEXT _can_ be used on Windows 9x, as any
program like clipbrd.exe or ClipConvert will show you.

> - Drop optimizations for ASCII-only text.  This is mostly because I
>   couldn't get all combinations straight in my mind, between this, the
>   `last_clipboard_text' mechanism and CF_UNICODETEXT.

Is that optimization indeed an optimization?  That is, does it give us
any significant speed-up?  Can you measure the speed of pasting a
large chunk of ASCII text in an Emacs that has this optimization and
compare it to the speed of pasting non-ASCII text?




reply via email to

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