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
This commit is contained in:
@@ -1411,8 +1411,8 @@ public:
|
|||||||
{
|
{
|
||||||
// It's a "normal" character. Notice that this includes
|
// It's a "normal" character. Notice that this includes
|
||||||
// control characters in 1..31 range, e.g. WXK_RETURN or
|
// control characters in 1..31 range, e.g. WXK_RETURN or
|
||||||
// WXK_BACK.
|
// WXK_BACK, so check for them explicitly.
|
||||||
if ( wxIsprint(uc) )
|
if ( uc >= 32 )
|
||||||
{
|
{
|
||||||
wxLogMessage("You pressed '%c'", uc);
|
wxLogMessage("You pressed '%c'", uc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user