From: Vadim Zeitlin Date: Sun, 9 Sep 2012 10:46:14 +0000 (+0000) Subject: Do not use wxIsprint() in EVT_CHAR example in the documentation. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6b7bcbf1efd8e793e18af042060039a74674770b Do not use wxIsprint() in EVT_CHAR example in the documentation. This is incorrect as wxIsprint() is locale-dependent and only really works as expected in UTF-8 locales (which are never used under Windows). Instead, just test for control characters directly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/event.h b/interface/wx/event.h index 9f75e9a785..a7f20d1b73 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -1411,8 +1411,8 @@ public: { // It's a "normal" character. Notice that this includes // control characters in 1..31 range, e.g. WXK_RETURN or - // WXK_BACK. - if ( wxIsprint(uc) ) + // WXK_BACK, so check for them explicitly. + if ( uc >= 32 ) { wxLogMessage("You pressed '%c'", uc); }