On Dec 14, 2003, at 9:15 PM, Doug McNutt wrote:
pbpaste, as a tool, does not allow tor an argument for selecting which information type is to be selected.
The pbpaste command seems to know about three types, ascii, postscript, and rtf,
and by default it will try to retrieve the clipboard in that order. The initial
attempt to retrieve the clipboard in a format can be adjusted with the "-Prefer"
command line argument, (from what I can see from <http://www.vorlesungen.uni-osnabrueck.de/informatik/shellscript/Html/ Man/_Man_NeXT_html/html1/pbcopy.1.html>
the option has existed since the NextSTEP days.
The underlying implementation is undoubtedly built on the
NSPasteboard object <http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSPasteboard.html> which has an option to represent the clipboard
data as an NSString. Oddly enough, NSStrings can hold Unicode strings. The NSString
component representation of the clipboard is probably turned into text to be output
from pbpaste via a method like -lossyCString.