summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-04-28 11:36:18 -0700
committerJan Vorlicek <janvorli@microsoft.com>2015-04-28 11:36:18 -0700
commit02b6887478def32374b6dbad34ec7a975fa4cfda (patch)
treed1be758395082d8b84000b28b4cf598310a2ea96 /src/pal
parent0fe17e9cfe627abfd860ff53772768608da3a08d (diff)
parent4fdbe0f4d6c6d4df137e1f3f8863d6c7fa62db49 (diff)
downloadcoreclr-02b6887478def32374b6dbad34ec7a975fa4cfda.tar.gz
coreclr-02b6887478def32374b6dbad34ec7a975fa4cfda.tar.bz2
coreclr-02b6887478def32374b6dbad34ec7a975fa4cfda.zip
Merge pull request #853 from janvorli/fix-coreclr-resources-locale
Add back setting locale for gettext
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/src/include/pal/locale.h2
-rw-r--r--src/pal/src/init/pal.cpp4
-rw-r--r--src/pal/src/locale/unicode.cpp16
3 files changed, 21 insertions, 1 deletions
diff --git a/src/pal/src/include/pal/locale.h b/src/pal/src/include/pal/locale.h
index 2a878f0394..398a137325 100644
--- a/src/pal/src/include/pal/locale.h
+++ b/src/pal/src/include/pal/locale.h
@@ -38,6 +38,8 @@ extern "C"
#define ISO_NAME(region, encoding, part) region ".ISO" encoding "-" part
#endif
+void InitializeStringResources(void);
+
#if HAVE_COREFOUNDATION
#define CF_EXCLUDE_CSTD_HEADERS
#include <CoreFoundation/CoreFoundation.h>
diff --git a/src/pal/src/init/pal.cpp b/src/pal/src/init/pal.cpp
index 0e33e81223..b2bc131ebd 100644
--- a/src/pal/src/init/pal.cpp
+++ b/src/pal/src/init/pal.cpp
@@ -669,7 +669,9 @@ PAL_InitializeCoreCLR(
{
return ERROR_DLL_INIT_FAILED;
}
-
+
+ InitializeStringResources();
+
if (!fStayInPAL)
{
PAL_Leave(PAL_BoundaryTop);
diff --git a/src/pal/src/locale/unicode.cpp b/src/pal/src/locale/unicode.cpp
index cc7d52cb41..c44a6ae0eb 100644
--- a/src/pal/src/locale/unicode.cpp
+++ b/src/pal/src/locale/unicode.cpp
@@ -951,6 +951,22 @@ EXIT:
return retval;
}
+/*++
+ Function :
+ InitializeStringResources -
+
+ Initialize the the native resources string support
+ --*/
+void InitializeStringResources(void)
+{
+#ifndef __APPLE__
+ // Set the locale for string resources to en_US
+ // UNIXTODO: After we add localized resources, change this to check the current
+ // locale and set it to en_US only if we don't have resources for the current locale.
+ setlocale(LC_MESSAGES, "en_US.UTF-8");
+#endif // __APPLE__
+}
+
extern char g_szCoreCLRPath[MAX_PATH];
/*++