fix problems with non-ASCII text in clipboard (issue #9)