From a055ae8b8dfdafccfc05c25614eefe04637252a9 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sat, 9 Sep 2017 16:57:06 -1000 Subject: [PATCH] Minimally begin to support UTF8 --- src/misc.c | 7 ++++++- src/misc.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/misc.c b/src/misc.c index 623bff5e..c4b21bf1 100644 --- a/src/misc.c +++ b/src/misc.c @@ -15,6 +15,8 @@ #include "common.h" +#include + #define SAVE_MAGICK "A2VM" #define SAVE_MAGICK2 "A2V2" #define SAVE_VERSION 2 @@ -32,6 +34,7 @@ static bool emulatorShuttingDown = false; const char *data_dir = NULL; char **argv = NULL; int argc = 0; +const char *locale = NULL; CrashHandler_s *crashHandler = NULL; #if defined(CONFIG_DATADIR) @@ -80,7 +83,6 @@ static void _cli_argsToPrefs(void) { } } } - #elif defined(ANDROID) || (TARGET_OS_MAC || TARGET_OS_PHONE) // data_dir is set up elsewhere #else @@ -440,6 +442,9 @@ int main(int _argc, char **_argv) { argc = _argc; argv = _argv; + locale = setlocale(LC_ALL, ""); + LOG("locale is : %s", locale); + #if TESTING # if TEST_CPU // Currently this test is the only one that blocks current thread and runs as a black screen diff --git a/src/misc.h b/src/misc.h index a011cbe0..9f7a3b45 100644 --- a/src/misc.h +++ b/src/misc.h @@ -35,6 +35,9 @@ extern const char *data_dir; extern char **argv; extern int argc; +// locale +extern const char *locale; + // // Emulator lifecycle //