5f7eee9ec9
* mingwex/mb_wc_common.h (get_codepage): Revert change of 2006-09-19.
14 lines
315 B
C
Executable File
14 lines
315 B
C
Executable File
#include <locale.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
static inline
|
|
unsigned int get_codepage (void)
|
|
{
|
|
/* locale :: "lang[_country[.code_page]]" | ".code_page" */
|
|
char * cp_string;
|
|
if ((cp_string = strchr (setlocale(LC_CTYPE, NULL), '.')))
|
|
return ((unsigned) atoi (cp_string + 1));
|
|
return 0;
|
|
}
|