summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/charset.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/lib/charset.c b/source3/lib/charset.c
index 217f407b9e..e29e60303a 100644
--- a/source3/lib/charset.c
+++ b/source3/lib/charset.c
@@ -167,8 +167,13 @@ void charset_initialise()
for (i=0; i<=255; i++) {
char c = (char)i;
upper_char_map[i] = lower_char_map[i] = c;
- if (isupper(c)) lower_char_map[i] = tolower(c);
- if (islower(c)) upper_char_map[i] = toupper(c);
+
+ /* Some systems have buggy isupper/islower for characters
+ above 127. Best not to rely on them. */
+ if(i < 128) {
+ if (isupper(c)) lower_char_map[i] = tolower(c);
+ if (islower(c)) upper_char_map[i] = toupper(c);
+ }
}
}