# How can I get Mathematica to support the clipboard?

For several decades, the clipboard feature supported by all mainstream operating systems has functioned as a method of exchange between applications (not just within them), by serving as a kind of clearinghouse for formats potentially useful to recipient applications. In this model it is the source application's responsibility to provide formats of general utility to recipient applications, particularly basic textual and Unicode representations.

For example, if I copy an image from my Web browser, the clipboard includes not only several different image formats (e.g. BMP, TIFF, etc.) but also textual formats (both plain text and Unicode) that can be used by recipient applications unable to make sense of the image formats. In this case, a URL from where the image can be retrieved.

Mathematica however does not do this.

If, for example I copy

abcdefg


from a Notebook, the clipboard does not contain any textual format of use to a text-based recipient application, but instead has three textual formats, all of which contain

a\\
b\\
c\\
d\\
e\\
f\\
g


which is entirely useless almost everywhere.

Mathematica seems to offer a simple though somewhat awkward workaround in the form of a "Copy as Text..." command (and a corresponding keyboard shortcut). But this doesn't work as required either: for example

αβγδϵ


copied "as text" puts

\[Alpha]\[Beta]\[Gamma]\[Delta]\[Epsilon]


on the clipboard in all textual formats (including "unicode"!)! And simply copying is even worse, causing Mathematica to freeze when a paste is attempted, and yielding

Œ±\
Œ≤\
Œ≥\
Œ¥\
œµ


only after Mathematica (and in some cases the receiving application as well) has been terminated (by "Force Quitting")!

This is so nonsensical (did Wolfram miss the memo from the 80s about how clipboards work?) that there must be something I'm missing: How do I configure Mathematica to support standard clipboard behavior?

Note that a version (sort of the reverse) of this odd clipboard behavior occurs even outside the Notebook interface. If I use the Mathematica shell in my command line program (Terminal on OS X), while I can copy text like αβγδϵ from the shell to other applications as expected, copying within the Mathematica shell fails entirely: nothing appears at all when I paste!

For anyone interested in exploring these oddities more deeply, on OS X, simply run the clipboard as record in any AppleScript tool after copying from Mathematica.

• As an interim measure, it might be useful to know that Save As... in plain text format seems to perform the correct unicode translations, producing output which when viewed in the TextEdit app looks very similar to the notebook's appearance in Mathematica. – Ralph Dratman Dec 23 '15 at 1:44
• This bug persists in version 11, and appears to have worsened. Copying from MMA and switching go other apps (e.g. any JetBrains IDE, Pages, etc.) causes both MMA and the app to freeze and require a force-quit. – orome Sep 3 '16 at 13:34
• The copy and paste crash behavior also occurs in other apps (e.g. copying from MMA to Safari crashes both apps fatally). – orome Oct 8 '16 at 13:45
• This bug persists in 11.1. – orome Mar 23 '17 at 16:37
• This bug persists in 11.1.1.0. – orome Sep 6 '17 at 18:23