[wx-dev] [ wxwindows-Bugs-1460302 ] wxExpandEnvVars: incorrect
escape char. handling on Windows
SourceForge.net
noreply at sourceforge.net
Mon May 12 08:45:25 PDT 2008
Bugs item #1460302, was opened at 2006-03-28 22:27
Message generated for change (Comment added) made by neis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1460302&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: Common
Group: Platform specific
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Dmitry Dembinsky (xlogger)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxExpandEnvVars: incorrect escape char. handling on Windows
Initial Comment:
wxExpandEnvVars misinterprets '$' character in the path:
e.g.
wxExpandEnvVars("c:\\WINDOWS\\$hf_mig$")
returns
"c:\\WINDOWS$hf_mig$"
Consequently, wxFileName::Normalize() method (using
wxExpandEnvVars internally) produces incorrect result.
Excerpted from wx src/common/config.cpp
---------------------------------------
case '\\':
// backslash can be used to suppress special
meaning of % and $
if ( n != str.Len() - 1 &&
(str[n + 1] == wxT('%') || str[n + 1]
== wxT('$')) ) {
strResult += str[++n];
break;
}
---------------------------------------
In Windows, however, '$' character has no special
meaning and may not be escaped.
----------------------------------------------------------------------
>Comment By: Stefan Neis (neis)
Date: 2008-05-12 15:45
Message:
Logged In: YES
user_id=32202
Originator: NO
It doesn't have a built-in special meaning , however, to simplify users
life, it supports it with the same meaning as other platforms do. The
workaround is to use "\\\\$", if you really mean a backslash followed by a
$.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1460302&group_id=9863
More information about the wx-dev
mailing list