Minimally begin to support UTF8

This commit is contained in:
Aaron Culliney 2017-09-09 16:57:06 -10:00
parent 25e4fd0eba
commit a055ae8b8d
2 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,8 @@
#include "common.h" #include "common.h"
#include <locale.h>
#define SAVE_MAGICK "A2VM" #define SAVE_MAGICK "A2VM"
#define SAVE_MAGICK2 "A2V2" #define SAVE_MAGICK2 "A2V2"
#define SAVE_VERSION 2 #define SAVE_VERSION 2
@ -32,6 +34,7 @@ static bool emulatorShuttingDown = false;
const char *data_dir = NULL; const char *data_dir = NULL;
char **argv = NULL; char **argv = NULL;
int argc = 0; int argc = 0;
const char *locale = NULL;
CrashHandler_s *crashHandler = NULL; CrashHandler_s *crashHandler = NULL;
#if defined(CONFIG_DATADIR) #if defined(CONFIG_DATADIR)
@ -80,7 +83,6 @@ static void _cli_argsToPrefs(void) {
} }
} }
} }
#elif defined(ANDROID) || (TARGET_OS_MAC || TARGET_OS_PHONE) #elif defined(ANDROID) || (TARGET_OS_MAC || TARGET_OS_PHONE)
// data_dir is set up elsewhere // data_dir is set up elsewhere
#else #else
@ -440,6 +442,9 @@ int main(int _argc, char **_argv) {
argc = _argc; argc = _argc;
argv = _argv; argv = _argv;
locale = setlocale(LC_ALL, "");
LOG("locale is : %s", locale);
#if TESTING #if TESTING
# if TEST_CPU # if TEST_CPU
// Currently this test is the only one that blocks current thread and runs as a black screen // Currently this test is the only one that blocks current thread and runs as a black screen

View File

@ -35,6 +35,9 @@ extern const char *data_dir;
extern char **argv; extern char **argv;
extern int argc; extern int argc;
// locale
extern const char *locale;
// //
// Emulator lifecycle // Emulator lifecycle
// //