fix problems with non-ASCII text in clipboard

fix issue #9
Merge pull request #10 from teegaar/master

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