From: Tarek Mahmoud Sayed Date: Mon, 5 Sep 2016 19:13:23 +0000 (-0700) Subject: Allow mapping LCID and culture names mapping for neutral culture (#7049) X-Git-Tag: accepted/tizen/base/20180629.140029~3653 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a3506ec958d920096e8f544d5b19100a5969e75;p=platform%2Fupstream%2Fcoreclr.git Allow mapping LCID and culture names mapping for neutral culture (#7049) This change is to pass the flag LOCALE_ALLOW_NEUTRAL_NAMES to the OS API to allow mapping LCID to/from culture names. --- diff --git a/src/utilcode/newapis.cpp b/src/utilcode/newapis.cpp index fbf2023..3717f02 100644 --- a/src/utilcode/newapis.cpp +++ b/src/utilcode/newapis.cpp @@ -1091,11 +1091,11 @@ inline BOOL IsInvariantCasing(__in LPCWSTR lpLocaleName, __in DWORD dwMapFlags) int retVal = 0; #if !defined(ENABLE_DOWNLEVEL_FOR_NLS) - retVal = ::LCIDToLocaleName(Locale, lpName, cchName, dwFlags); + retVal = ::LCIDToLocaleName(Locale, lpName, cchName, dwFlags | LOCALE_ALLOW_NEUTRAL_NAMES); #else #ifdef FEATURE_CORECLR - retVal = DownLevel::LCIDToLocaleName(Locale, lpName,cchName,dwFlags); + retVal = DownLevel::LCIDToLocaleName(Locale, lpName,cchName,dwFlags | LOCALE_ALLOW_NEUTRAL_NAMES); #endif // FEATURE_CORECLR typedef int (WINAPI *PFNLCIDToLocaleName)(LCID, LPWSTR,int ,DWORD); @@ -1136,10 +1136,10 @@ inline BOOL IsInvariantCasing(__in LPCWSTR lpLocaleName, __in DWORD dwMapFlags) LCID retVal = 0; #if !defined(ENABLE_DOWNLEVEL_FOR_NLS) - return ::LocaleNameToLCID(lpName, dwFlags); + return ::LocaleNameToLCID(lpName, dwFlags | LOCALE_ALLOW_NEUTRAL_NAMES); #else #ifdef FEATURE_CORECLR - retVal = DownLevel::LocaleNameToLCID(lpName, dwFlags); + retVal = DownLevel::LocaleNameToLCID(lpName, dwFlags | LOCALE_ALLOW_NEUTRAL_NAMES); #endif // FEATURE_CORECLR typedef int (WINAPI *PFNLocaleNameToLCID)(LPCWSTR,DWORD);