diff options
Diffstat (limited to 'misc/unix/charset.c')
-rw-r--r-- | misc/unix/charset.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/unix/charset.c b/misc/unix/charset.c index 90528e022..df49c9e84 100644 --- a/misc/unix/charset.c +++ b/misc/unix/charset.c @@ -107,7 +107,12 @@ APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool) const char *charset; charset = nl_langinfo(CODESET); - if (charset) { + if (charset && *charset) { +#ifdef _OSD_POSIX /* Bug workaround - delete as soon as fixed in OSD_POSIX */ + /* Some versions of OSD_POSIX return nl_langinfo(CODESET)="^[nN]" */ + /* Ignore the bogus information and use apr_os_default_encoding() */ + if (charset[0] != '^') +#endif return charset; } #endif |