diff options
author | Hennes Rohling <hro@openoffice.org> | 2001-05-09 14:20:42 +0000 |
---|---|---|
committer | Hennes Rohling <hro@openoffice.org> | 2001-05-09 14:20:42 +0000 |
commit | 54007bb90c30469a5357c56056b8fdba3a233e24 (patch) | |
tree | 32a3b439360ff84b8937fa20edd99c38b6ba4a57 /sal/osl/unx | |
parent | 3b1d10acc297db493b1f4e1999f6ba71f72db7f1 (diff) |
#84715# osl_getThreadTextEncoding first defaults to contents of environment variable SOLAR_USER_RTL_TEXTENCODING
Diffstat (limited to 'sal/osl/unx')
-rw-r--r-- | sal/osl/unx/thread.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 9a723ab429ee..c6e1e2cbbadd 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -2,9 +2,9 @@ * * $RCSfile: thread.c,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: obr $ $Date: 2001-04-11 11:33:07 $ + * last change: $Author: hro $ $Date: 2001-05-09 15:20:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1118,12 +1118,18 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding() /* check if thread key exists */ if( -1 == gTextEncodingKey ) { - rtl_TextEncoding defaultEncoding = osl_getTextEncodingFromLocale( NULL ); + rtl_TextEncoding defaultEncoding; + oslMutex globalMutex = *osl_getGlobalMutex(); /* creation of thread key must be thread save */ osl_acquireMutex( globalMutex ); + if ( NULL != (pszEncoding = getenv( "SOLAR_USER_RTL_TEXTENCODING" )) ) + defaultEncoding = atoi(pszEncoding); + else + defaultEncoding = osl_getTextEncodingFromLocale( NULL ); + if( -1 == gTextEncodingKey ) { /* create thread key */ |