[ wxwindows-Bugs-1175411 ] wxSTC clipboard text still has trailing ascii 0

SourceForge.net noreply at sourceforge.net
Mon May 21 20:37:40 PDT 2007


Bugs item #1175411, was opened at 2005-04-02 17:54
Message generated for change (Comment added) made by csomor
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1175411&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMac specific
Group: None
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Kevin Altis (kasplat)
Assigned to: Stefan Csomor (csomor)
Summary: wxSTC clipboard text still has trailing ascii 0

Initial Comment:
As of wxPython 2.5.4.1, the clipboard text on the Mac still contains 
an ASCII 0 which is a problem when attempting to paste text copied 
from wxSTC into Mail, Terminal, or any other Mac application. Did 
anyone ever come up with a workaround for this on the Mac? At one 
point, I thought there was a suggestion to put at least two different 
types of clipboard text objects into the clipboard, so that wxSTC on 
the Mac would be able to get its trailing ascii 0 or modify the 
clipboard functions for wxSTC on the Mac to automatically append a 
zero.

----------------------------------------------------------------------

>Comment By: Stefan Csomor (csomor)
Date: 2007-05-22 05:37

Message:
Logged In: YES 
user_id=81467
Originator: NO

I've rewritten the clipboard and d&d code to use the pasteboard APIs in
2.8, and there shouldn't be any trailing zero datas anymore on the native
clipboard

Thanks,

Steafn

----------------------------------------------------------------------

Comment By: Kevin Ollivier (kollivier)
Date: 2006-08-13 02:41

Message:
Logged In: YES 
user_id=248468

This is a ping about this bug report. I spoke with Robin and he said the
bug 
should be noticeable by the need to backspace twice before actually
deleting a 
character. I don't see that problem in wxPython 2.6.3.3. If this is not
fixed, could 
you let me know a way to reproduce the issue? 

----------------------------------------------------------------------

Comment By: Robin Dunn (robind)
Date: 2005-04-04 02:40

Message:
Logged In: YES 
user_id=53955

Stefan,

I think this happens because wxTextDataObject::GetDataSize
is adding 1 to the size.  the attached patch fixes it for
me, but I don't know if this is the right way to take care
of it.


----------------------------------------------------------------------

Comment By: Robin Dunn (robind)
Date: 2005-04-04 02:16

Message:
Logged In: YES 
user_id=53955

Ah, wait a minute...  I think I do see the problem, even
with my change.  For example, in the TextEdit app after
pasting something that was copied in a wx app, then you need
to press the cursor keys twice to get past the hidden null
bute at the end of the pasted string, right?



----------------------------------------------------------------------

Comment By: Robin Dunn (robind)
Date: 2005-04-04 01:59

Message:
Logged In: YES 
user_id=53955

I couldn't duplicate the manifestation of the problem, but I
did find that wxSTC was adding an extra byte to the string
to be put in the clipboard.  So I've trimmed that off and
checked in the new code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1175411&group_id=9863




More information about the wx-dev mailing list