diff options
author | Hennes Rohling <hro@openoffice.org> | 2001-05-09 13:45:39 +0000 |
---|---|---|
committer | Hennes Rohling <hro@openoffice.org> | 2001-05-09 13:45:39 +0000 |
commit | 3b1d10acc297db493b1f4e1999f6ba71f72db7f1 (patch) | |
tree | a0885b46b93ab5ffd35a5b47d122b609b99f6988 /sal/osl/w32/thread.c | |
parent | c6f372026344c4db5f1cffa14ced048c6fa93fec (diff) |
#84715# osl_getThreadTextEncoding first defaults to contents of environment variable SOLAR_USER_RTL_TEXTENCODING
Diffstat (limited to 'sal/osl/w32/thread.c')
-rw-r--r-- | sal/osl/w32/thread.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c index 3a5489703653..82a94d625dc0 100644 --- a/sal/osl/w32/thread.c +++ b/sal/osl/w32/thread.c @@ -2,9 +2,9 @@ * * $RCSfile: thread.c,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obr $ $Date: 2001-04-11 11:25:58 $ + * last change: $Author: hro $ $Date: 2001-05-09 14:45:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -751,7 +751,13 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding() if ( !gotACP ) { - _encoding = GetTextEncodingFromCodePage( GetACP() ); + char *pszEncoding; + + if ( NULL != (pszEncoding = getenv( "SOLAR_USER_RTL_TEXTENCODING" )) ) + _encoding = atoi(pszEncoding); + else + _encoding = GetTextEncodingFromCodePage( GetACP() ); + TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)MAKELONG( _encoding, TRUE ) ); } |