[wx-dev] [ wxwindows-Bugs-1955413 ] wxString::To8BitData segfaults for apostrophe character

SourceForge.net noreply at sourceforge.net
Thu May 1 06:29:44 PDT 2008


Bugs item #1955413, was opened at 2008-05-01 15:19
Message generated for change (Comment added) made by vaclavslavik
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1955413&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: Generic
Group: Must fix
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Andrej Sinicyn (andrej4000)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxString::To8BitData segfaults for apostrophe character

Initial Comment:
If I have a Unicode string containing the punctuation apostrophe (U+2019) and try to convert it to ANSI the whole program segfaults.

I'm using Unicode builds of wxGTK and wxMSW and both have the problem.

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

>Comment By: Vaclav Slavik (vaclavslavik)
Date: 2008-05-01 15:29

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

Your forgot to include three crucial pieces of information:

(1) wx version
(2) backtrace showing where exactly the crash occurred
(3) a patch against one of the wx samples or a small program that can be
used to reproduce the bug

Changes are high that it's a bug in the code _using_ To8BitData().

> try to convert it to ANSI

Note that this method is *not* appropriate for converting to ANSI,
mb_str() is. To8BitData() is intended *only* for retrieval of strings
previously set using From8BitData() in cases when you need to store
non-string binary data in wxString, it's not meant for anything else.

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

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


More information about the wx-dev mailing list