git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26203
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
strResult.Alloc(str.Len());
for ( const wxChar *pc = str.c_str(); *pc != wxT('\0'); pc++ ) {
strResult.Alloc(str.Len());
for ( const wxChar *pc = str.c_str(); *pc != wxT('\0'); pc++ ) {
// we explicitly allow some of "safe" chars and 8bit ASCII characters
// we explicitly allow some of "safe" chars and 8bit ASCII characters
- // which will probably never have special meaning
+ // which will probably never have special meaning and with which we can't
+ // use isalnum() anyhow (in ASCII built, in Unicode it's just fine)
+ //
// NB: note that wxCONFIG_IMMUTABLE_PREFIX and wxCONFIG_PATH_SEPARATOR
// should *not* be quoted
// NB: note that wxCONFIG_IMMUTABLE_PREFIX and wxCONFIG_PATH_SEPARATOR
// should *not* be quoted
- if ( !wxIsalnum(c) && !wxStrchr(wxT("@_/-!.*%"), c) && ((c & 0x80) == 0) )
+ if (
+#if !wxUSE_UNICODE
+ (c < 127) &&
+#endif // ANSI
+ !wxIsalnum(c) && !wxStrchr(wxT("@_/-!.*%"), c) )
+ {