martin 2003/05/28 06:55:18
Modified: misc/unix charset.c
Log:
[PORTING] Bug workaround for OSD/POSIX
Revision Changes Path
1.5 +6 -1 apr/misc/unix/charset.c
Index: charset.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/charset.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- charset.c 10 Mar 2003 09:50:38 -0000 1.4
+++ charset.c 28 May 2003 13:55:18 -0000 1.5
@@ -107,7 +107,12 @@
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