This required refactoring open_file so that it would return the encoding of any existing file. Before, the caller had to re-open the clipboard for reading to determine the encoding and this would populate the clipboard file with "No Text in Clipboard".