I already know how to get plain text from the clipboard in Java, but sometimes the text is encoded in some weird DataFlavor, like when copying from Microsoft Word or from a website or even source code from Eclipse.
How to extract pure plain text from these DataFlavors?
with the
getData()Method and thestringFlavoryou should get plain text from the clipboard.If there are weird text in the clipboard, I think, this should be a problem of the program which puts the data in the clipboard.