Thomas Kluyver <tak...@gmail.com> added the comment: OK, after a quick bit of reading, I see why I'm confused: the clipboard actually works by requesting the text from the source program, so where you copy it from makes a difference. In my case, copying from firefox gives 'abc\\u20ac', and copying from Geany gives u'abc\xe2\x82\xac'.
However, I still think there's something that can be improved in Python. As Serhiy points out, specifying type='UTF8_STRING' makes it work properly from both programs. The Tcl documentation recommends this as the best option for "modern X11 systems"[1]. >From what Ned says, we can't make UTF8_STRING the default everywhere, but is >there a way to detect if we're inside X11, and use UTF8_STRING by default >there? [1] http://www.tcl.tk/man/tcl/TkCmd/clipboard.htm ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14777> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com