Stripping characters from windows clipboard with win32clipboard from excel
Dave Angel
davea at davea.name
Wed Sep 18 19:51:57 EDT 2013
On 18/9/2013 17:40, Neil Hodgson wrote:
> Dave Angel:
>
>> So is the bug in Excel, in Windows, or in the Python library? Somebody
>> is falling down on the job; if Windows defines the string as ending at
>> the first null, then the Python interface should use that when defining
>> the text defined with CF_UNICODETEXT.
>
> Everything is performing correctly. win32clipboard is low-level
> direct access to the Win32 clipboard API. A higher level API which is
> more easily used from Python could be defined on top of this if anyone
> was motivated.
>
> Neil
Clearly you miss the point. If the clipboard API is defined to return a
null-terminated string, then the problem is in the Python library which
doesn't do a strlen() (or the wide-character equivalent; I forget its
name) on the results.
But there's a big if there. Somebody is either ill specified or poorly
implemented here.
--
DaveA
More information about the Python-list
mailing list