diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 16 | ||||
| -rw-r--r-- | src/fl_shortcut.cxx | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 9d9150e01..a61be37e1 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -90,12 +90,13 @@ const char* Fl_Input_::expand(const char* p, char* buf) const { *o++ = ' '; #else // in ISO 8859-1, undefined characters are rendered as octal - } else if (c >= 128 && c < 0xA0) { + // this is commented out since most X11 seems to use MSWindows Latin-1 + //} else if (c >= 128 && c < 0xA0) { // these codes are not defined in ISO code, so we output the octal code instead - *o++ = '\\'; - *o++ = ((c>>6)&0x03) + '0'; - *o++ = ((c>>3)&0x07) + '0'; - *o++ = (c&0x07) + '0'; + // *o++ = '\\'; + // *o++ = ((c>>6)&0x03) + '0'; + // *o++ = ((c>>3)&0x07) + '0'; + // *o++ = (c&0x07) + '0'; } else if (c == 0xA0) { // nbsp *o++ = ' '; #endif @@ -124,9 +125,10 @@ double Fl_Input_::expandpos( #ifdef __APPLE__ // in MacRoman, all characters are defined #else - } else if (c >= 128 && c < 0xA0) { + // in Windows Latin-1 all characters are defined + //} else if (c >= 128 && c < 0xA0) { // these codes are not defined in ISO code, so we output the octal code instead - n += 4; + // n += 4; #endif } else { n++; diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 8742b7460..34c9d4dde 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -58,7 +58,8 @@ int Fl::test_shortcut(int shortcut) { #ifdef __APPLE__ if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { #else - if (v > 32 && v < 0x7f || v >= 0xa0 && v <= 0xff) { + // most X11 use MSWindows Latin-1 if set to Western encoding, so 0x80 to 0xa0 are defined + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { #endif if (isupper(v)) { shortcut |= FL_SHIFT; |
