Commit 9ff8da54 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Don't store the current codepage in the thread data.

parent 0190edee
......@@ -27,12 +27,11 @@ struct tagSYSLEVEL;
struct kernel_thread_data
{
UINT code_page; /* thread code page */
WORD stack_sel; /* 16-bit stack selector */
WORD htask16; /* Win16 task handle */
DWORD sys_count[4]; /* syslevel mutex entry counters */
struct tagSYSLEVEL *sys_mutex[4]; /* syslevel mutex pointers */
void *pad[44]; /* change this if you add fields! */
void *pad[45]; /* change this if you add fields! */
};
static inline struct kernel_thread_data *kernel_get_thread_data(void)
......
......@@ -222,7 +222,8 @@ static const union cptable *get_codepage_table( unsigned int codepage )
case CP_UTF8:
break;
case CP_THREAD_ACP:
if (!(codepage = kernel_get_thread_data()->code_page)) return ansi_cptable;
if (NtCurrentTeb()->CurrentLocale == GetUserDefaultLCID()) return ansi_cptable;
codepage = get_lcid_codepage( NtCurrentTeb()->CurrentLocale );
/* fall through */
default:
if (codepage == ansi_cptable->info.codepage) return ansi_cptable;
......@@ -2057,7 +2058,6 @@ BOOL WINAPI SetThreadLocale( LCID lcid )
}
NtCurrentTeb()->CurrentLocale = lcid;
kernel_get_thread_data()->code_page = get_lcid_codepage( lcid );
}
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment