From 996dbc937aecc77b6e6bcf17385a4cf18d0b1619 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 16 Dec 2016 17:19:04 -0500 Subject: [PATCH] add UTF8 BOM and pragma in some files to fix MSVC build errors --- intl/msg_hash_chs.c | 7 ++++++- intl/msg_hash_ja.c | 7 ++++++- intl/msg_hash_ja.h | 5 +++++ intl/msg_hash_pl.c | 7 ++++++- intl/msg_hash_ru.h | 5 +++++ intl/msg_hash_vn.c | 7 ++++++- menu/menu_event.c | 7 ++++++- 7 files changed, 40 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_chs.c b/intl/msg_hash_chs.c index fd0ef1df5b..d0af2f7528 100644 --- a/intl/msg_hash_chs.c +++ b/intl/msg_hash_chs.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -23,6 +23,11 @@ #include "../configuration.h" #include "../verbosity.h" +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/intl/msg_hash_ja.c b/intl/msg_hash_ja.c index aab54ea489..430de9b0b7 100644 --- a/intl/msg_hash_ja.c +++ b/intl/msg_hash_ja.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis * Copyright (C) 2016 - Brad Parker * @@ -24,6 +24,11 @@ #include "../configuration.h" #include "../verbosity.h" +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 39b490c160..db08136d9d 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -1,3 +1,8 @@ +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + MSG_HASH( MSG_COMPILER, "コンパイラ" diff --git a/intl/msg_hash_pl.c b/intl/msg_hash_pl.c index bee8cf1bc7..6a25406182 100644 --- a/intl/msg_hash_pl.c +++ b/intl/msg_hash_pl.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -17,6 +17,11 @@ #include "../msg_hash.h" +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + int menu_hash_get_help_pl_enum(enum msg_hash_enums msg, char *s, size_t len) { int ret = 0; diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index a7fd9215b2..c7a64f82cd 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -1,3 +1,8 @@ +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + MSG_HASH( MSG_COMPILER, "Compiler" diff --git a/intl/msg_hash_vn.c b/intl/msg_hash_vn.c index 269f1aa2f8..f6a7993d08 100644 --- a/intl/msg_hash_vn.c +++ b/intl/msg_hash_vn.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis * Copyright (C) 2016 - Brad Parker * @@ -24,6 +24,11 @@ #include "../configuration.h" #include "../verbosity.h" +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/menu/menu_event.c b/menu/menu_event.c index 42cb81da0a..fd69c0aec0 100644 --- a/menu/menu_event.c +++ b/menu/menu_event.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2016 - Daniel De Matteis * Copyright (C) 2014-2016 - Jean-André Santoni @@ -45,6 +45,11 @@ #include "../retroarch.h" #include "../runloop.h" +#if defined(_MSC_VER) && !defined(_XBOX) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif + #define OSK_CHARS_PER_LINE 11 static unsigned char menu_keyboard_key_state[RETROK_LAST];