diff --git a/sc2/ChangeLog b/sc2/ChangeLog index ae92e4d60..192daaa11 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,7 @@ Changes towards version 0.7: +- The Unicode Private Use Area is no longer considered printable. This + is a stopgap to handle unusual behavior with text entry under OS X. + See bug #942 for more details - Michael - Do not rely on GL_UNPACK_SKIP_* arguments, which some OpenGL drivers mishandle (Bug #914) - Michael - Do not overwrite GLOBAL_SIS (CrewEnlisted) when leaving Hyperspace diff --git a/sc2/src/sc2code/libs/strings/unicode.c b/sc2/src/sc2code/libs/strings/unicode.c index 25b294125..0034bcffd 100644 --- a/sc2/src/sc2code/libs/strings/unicode.c +++ b/sc2/src/sc2code/libs/strings/unicode.c @@ -501,7 +501,14 @@ int isWideGraphChar(wchar_t ch) { // this is not technically sufficient, but close enough for us // we'll consider all non-control (CO and C1) chars in 'graph' class - return (ch > 0xa0) || (ch > 0x20 && ch < 0x7f); + // except for the "Private Use Area" (0xE000 - 0xF8FF) + + // TODO: The private use area is really only glommed by OS X, + // and even there, not all of it. (Delete and Backspace both + // end up producing characters there -- see bug #942 for the + // gory details.) + return (ch > 0xa0 && (ch < 0xE000 || ch > 0xF8FF)) || + (ch > 0x20 && ch < 0x7f); } int