[wx-dev] #9743: [unix] wxExecute handles UTF-8 incorrectly
wxTrac
noreply at wxsite.net
Tue Jul 15 12:36:31 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9743>
#9743: [unix] wxExecute handles UTF-8 incorrectly
----------------------------------+-----------------------------------------
Reporter: alarsen | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.9.0
Component: base | Version: 2.9-svn
Keywords: wxExecute unix utf-8 | Blockedby:
Patch: 0 | Blocking:
----------------------------------+-----------------------------------------
When ''wxExecute(const wxString& command, ...)'' splits ''command'' into
separate arguments it chops it up into separate characters and appends
them one-by-one to a ''wxString''.
Unfortunately this fails miserably if the command contains multibyte
characters (UTF-8); ''wxString::operator+='' will replace each byte with a
question mark.
E.g. the string "'''München'''" will be passed to the child as
"'''M??nchen'''".
AFAICT wxCmdLineParser::ConvertStringToArgs() seems to contain the same
type of bug.
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9743>
More information about the wx-dev
mailing list