summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormartin <martin@13f79535-47bb-0310-9956-ffa450edef68>2003-05-28 13:55:18 +0000
committermartin <martin@13f79535-47bb-0310-9956-ffa450edef68>2003-05-28 13:55:18 +0000
commit4e4d6d0debb6e9a7149f46eadcbbd42a2f84c9b1 (patch)
treef63eaadbb3209ef5b81c8d7b408d6d578746127e /misc
parent877c4e6bdc8b573afa4124e1f1e559bef9aee8b8 (diff)
downloadlibapr-4e4d6d0debb6e9a7149f46eadcbbd42a2f84c9b1.tar.gz
[PORTING] Bug workaround for OSD/POSIX
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r--misc/unix/charset.c7
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