[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up

2014-12-05 Thread Cees Timmerman
New submission from Cees Timmerman: # http://stackoverflow.com/a/25678113/819417 def copy(data): if not isinstance(data, unicode): data = data.decode('mbcs') OpenClipboard(None) EmptyClipboard() hCd = GlobalAlloc(GMEM_DDESHARE, 2 * (len(data) + 1)) pchData

[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up

2014-12-05 Thread Cees Timmerman
Cees Timmerman added the comment: A copy of my test program at https://gist.github.com/CTimmerman/133cb80100357dde92d8 -- Added file: http://bugs.python.org/file37366/test_clipboard_win.py ___ Python tracker rep...@bugs.python.org http