From: Julian Smart Date: Sat, 21 Jan 2006 15:09:20 +0000 (+0000) Subject: Fix for bug [ 1351659 ] wxTextValidator::Validate not Unicode safe X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f7f00d8a1d8a04e48f70e6ec014c9737ed1702f5 Fix for bug [ 1351659 ] wxTextValidator::Validate not Unicode safe git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 0960397823..ee3440fdbd 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -311,7 +311,7 @@ void wxTextValidator::OnChar(wxKeyEvent& event) ((m_validatorStyle & wxFILTER_ALPHA) && !wxIsalpha(keyCode)) || ((m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsalnum(keyCode)) || ((m_validatorStyle & wxFILTER_NUMERIC) && !wxIsdigit(keyCode) - && keyCode != '.' && keyCode != ',' && keyCode != '-') + && keyCode != wxT('.') && keyCode != wxT(',') && keyCode != wxT('-')) ) ) { @@ -333,7 +333,7 @@ static bool wxIsNumeric(const wxString& val) { // Allow for "," (French) as well as "." -- in future we should // use wxSystemSettings or other to do better localisation - if ((!wxIsdigit(val[i])) && (val[i] != '.') && (val[i] != ',') && (val[i] != wxT('e')) && (val[i] != wxT('E')) && (val[i] != wxT('+')) && (val[i] != wxT('-'))) + if ((!wxIsdigit(val[i])) && (val[i] != wxT('.')) && (val[i] != wxT(',')) && (val[i] != wxT('e')) && (val[i] != wxT('E')) && (val[i] != wxT('+')) && (val[i] != wxT('-'))) return false; } return true;