isascii() is non-ANSI and is not available under all platforms. While we
currently define it ourselves in wx/wxcrtbase.h in this case, it's not a good
idea as this can't be easily done correctly for all platforms so start
transitioning away from using isascii() by adding wxIsascii() and using it in
our own code.
The only remaining occurrences of isascii() are in Scintilla code which we
probably don't want to modify.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63165 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 inline int wxIsctrl(const wxUniChar& c) { return wxIscntrl(c); }
 #endif // WXWIN_COMPATIBILITY_2_8
 
+inline bool wxIsascii(const wxUniChar& c) { return c.IsAscii(); }
+
 #endif /* _WX_WXCRT_H_ */
 
             // must be a simple key
             if (
 #if !wxUSE_UNICODE
-                 isascii(code) &&
+                 // we can't call wxIsalnum() for non-ASCII characters in ASCII
+                 // build as they're only defined for the ASCII range (or EOF)
+                 wxIsascii(code) &&
 #endif // ANSI
                     wxIsalnum(code) )
             {
 
         const wxAcceleratorEntry& entry = entries[i];
 
         int keycode = entry.GetKeyCode();
-        if ( isascii(keycode) )
-            keycode = toupper(keycode);
+        if ( wxIsascii(keycode) )
+            keycode = wxToupper(keycode);
 
         M_ACCELDATA->m_accels.Append(new wxAcceleratorEntry(entry.GetFlags(),
                                                             keycode,
 
     if ( wxGridCellEditor::IsAcceptedKey(event) )
     {
         const int keycode = event.GetKeyCode();
-        if ( isascii(keycode) )
+        if ( wxIsascii(keycode) )
         {
-            char tmpbuf[2];
-            tmpbuf[0] = (char) keycode;
-            tmpbuf[1] = '\0';
-            wxString strbuf(tmpbuf, *wxConvCurrent);
-
 #if wxUSE_INTL
             const wxString decimalPoint =
                 wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER);
 
     const wxChar *p = line.c_str();
 
     // skip whitespace
-    while ( isascii(*p) && isspace(*p) )
+    while ( isascii(*p) && wxIsspace(*p) )
         p++;
 
     // skip empty lines and comments
         return false;
 
     p = end;
-    while ( isascii(*p) && isspace(*p) )
+    while ( isascii(*p) && wxIsspace(*p) )
         p++;
 
     // next should be the URL
     wxString url;
     url.reserve(line.length());
-    while ( isascii(*p) && !isspace(*p) )
+    while ( isascii(*p) && !wxIsspace(*p) )
         url += *p++;
 
-    while ( isascii(*p) && isspace(*p) )
+    while ( isascii(*p) && wxIsspace(*p) )
         p++;
 
     // and finally the optional description of the entry after comment
     if ( *p == WXEXTHELP_COMMENTCHAR )
     {
         p++;
-        while ( isascii(*p) && isspace(*p) )
+        while ( isascii(*p) && wxIsspace(*p) )
             p++;
         doc = p;
     }
 
     bool accShiftDown = ((GetFlags() & wxACCEL_SHIFT) == wxACCEL_SHIFT);
     int  accKeyCode = GetKeyCode();
     int  accKeyCode2 = GetKeyCode();
-    if (isascii(accKeyCode2))
-        accKeyCode2 = tolower(accKeyCode2);
+    if (wxIsascii(accKeyCode2))
+        accKeyCode2 = wxTolower(accKeyCode2);
 
     return ((eventAltDown == accAltDown) && (eventCtrlDown == accCtrlDown) &&
         (eventShiftDown == accShiftDown) &&
 
         XmTextVerifyCallbackStruct *textStruct =
             (XmTextVerifyCallbackStruct *) m_tempCallbackStruct;
         textStruct->doit = True;
-        if (isascii(event.m_keyCode) && (textStruct->text->length == 1))
+        if (wxIsascii(event.m_keyCode) && (textStruct->text->length == 1))
         {
             textStruct->text->ptr[0] = (char)((event.m_keyCode == WXK_RETURN) ? 10 : event.m_keyCode);
         }