Message160444
| Author |
takluyver |
| Recipients |
ned.deily, serhiy.storchaka, takluyver, terry.reedy |
| Date |
2012年05月11日.19:31:32 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1336764693.43.0.999857931154.issue14777@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月11日 19:31:33 | takluyver | set | recipients:
+ takluyver, terry.reedy, ned.deily, serhiy.storchaka |
| 2012年05月11日 19:31:33 | takluyver | set | messageid: <1336764693.43.0.999857931154.issue14777@psf.upfronthosting.co.za> |
| 2012年05月11日 19:31:32 | takluyver | link | issue14777 messages |
| 2012年05月11日 19:31:32 | takluyver | create |
|