win32clipboard.GetClipboardData() return string with null characters
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

win32clipboard.GetClipboardData() return string with null characters

From: aurora <aurora00@gmail.com>
Date: Thu May 26 2005 - 06:30:16 CEST

I was using win32clipboard.GetClipboardData() to retrieve the Windows
clipboard using code similar to the message below:

http://groups-beta.google.com/group/comp.lang.python/msg/3722ba3afb209314?hl=en

Some how I notice the data returned includes \0 and some characters that
shouldn't be there after the null character. It is easy enough to truncate
them. But why does it get there in the first place? Is the data length
somehow calculated wrong?

I'm using Windows XP SP2 with Python 2.4 and pywin32-203.

aurora
Received on Thu Sep 29 16:14:02 2005