From 0166fed8637b0a16697b997531f652ad7841b7ff Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Sat, 25 Mar 2000 23:03:26 +0000 Subject: [PATCH] A few Unicode fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/cmndata.cpp | 2 +- src/common/config.cpp | 15 +++++++-------- src/common/fs_mem.cpp | 2 +- src/common/intl.cpp | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 5919aa46a2..6ce1a1310e 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -668,7 +668,7 @@ void wxPrintData::ConvertFromNative() // Not sure if we should check for this mismatch // wxASSERT_MSG( (m_printerName == "" || (devName == m_printerName)), "Printer name obtained from DEVMODE and DEVNAMES were different!"); - if (printerName != "") + if (printerName != wxT("")) m_printerName = printerName; GlobalUnlock(hDevNames); diff --git a/src/common/config.cpp b/src/common/config.cpp index 40bad1ecc5..44171b597e 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -42,7 +42,6 @@ #include #include -#include // for isalnum() // ---------------------------------------------------------------------------- // global and class static variables @@ -292,13 +291,13 @@ wxString wxExpandEnvVars(const wxString& str) for ( size_t n = 0; n < str.Len(); n++ ) { switch ( str[n] ) { #ifdef __WXMSW__ - case '%': + case wxT('%'): #endif //WINDOWS - case '$': + case wxT('$'): { Bracket bracket; #ifdef __WXMSW__ - if ( str[n] == '%' ) + if ( str[n] == wxT('%') ) bracket = Bracket_Windows; else #endif //WINDOWS @@ -307,12 +306,12 @@ wxString wxExpandEnvVars(const wxString& str) } else { switch ( str[n + 1] ) { - case '(': + case wxT('('): bracket = Bracket_Normal; n++; // skip the bracket break; - case '{': + case wxT('{'): bracket = Bracket_Curly; n++; // skip the bracket break; @@ -324,7 +323,7 @@ wxString wxExpandEnvVars(const wxString& str) m = n + 1; - while ( m < str.Len() && (isalnum(str[m]) || str[m] == '_') ) + while ( m < str.Len() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) m++; wxString strVarName(str.c_str() + n + 1, m - n - 1); @@ -363,7 +362,7 @@ wxString wxExpandEnvVars(const wxString& str) case '\\': // backslash can be used to suppress special meaning of % and $ - if ( n != str.Len() && (str[n + 1] == '%' || str[n + 1] == '$') ) { + if ( n != str.Len() && (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { strResult += str[++n]; break; diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index bc089b0990..650e51165b 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -165,7 +165,7 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename) { wxString s; s.Printf(_("Failed to store image '%s' to memory VFS!"), filename.c_str()); - printf("'%s'\n", s.c_str()); + wxPrintf(wxT("'%s'\n"), s.c_str()); wxLogError(s); } } diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 69379ff601..f1da9ebc64 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -292,7 +292,7 @@ static wxString GetFullSearchPath(const wxChar *lang) // LC_PATH is a standard env var containing the search path for the .mo // files - const wxChar *pszLcPath = wxGetenv("LC_PATH"); + const wxChar *pszLcPath = wxGetenv(wxT("LC_PATH")); if ( pszLcPath != NULL ) searchPath << GetAllMsgCatalogSubdirs(pszLcPath, lang);