summaryrefslogtreecommitdiff
path: root/src/classlibnative
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-10 17:12:53 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-10 21:36:06 -0800
commit54891e0650e69f08832f75a40dc102efc6115d38 (patch)
tree0e032a0b337767801f696cbaeacded267c694f32 /src/classlibnative
parent396f7d43b3c0f3ca7034a6d1d9cd7d6914778a1e (diff)
downloadcoreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.gz
coreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.bz2
coreclr-54891e0650e69f08832f75a40dc102efc6115d38.zip
Remove always defined FEATURE_CORECLR
Diffstat (limited to 'src/classlibnative')
-rw-r--r--src/classlibnative/bcltype/arraynative.cpp13
-rw-r--r--src/classlibnative/bcltype/number.cpp53
-rw-r--r--src/classlibnative/bcltype/number.h3
-rw-r--r--src/classlibnative/bcltype/stringnative.cpp5
-rw-r--r--src/classlibnative/bcltype/system.cpp171
-rw-r--r--src/classlibnative/bcltype/system.h21
-rw-r--r--src/classlibnative/inc/nlsinfo.h7
-rw-r--r--src/classlibnative/nls/encodingdata.cpp579
-rw-r--r--src/classlibnative/nls/nlsinfo.cpp544
9 files changed, 0 insertions, 1396 deletions
diff --git a/src/classlibnative/bcltype/arraynative.cpp b/src/classlibnative/bcltype/arraynative.cpp
index 0eae8b2d07..39899b80ea 100644
--- a/src/classlibnative/bcltype/arraynative.cpp
+++ b/src/classlibnative/bcltype/arraynative.cpp
@@ -1186,18 +1186,6 @@ void ArrayNative::CheckElementType(TypeHandle elementType)
// TODO: We also should check for type/member visibility here. To do that we can replace
// the following chunk of code with a simple InvokeUtil::CanAccessClass call.
// But it's too late to make this change in Dev10 and we want SL4 to be compatible with Dev10.
-#ifndef FEATURE_CORECLR
- // Make sure security allows us access to the array type - if it is critical, convert that to a
- // demand for full trust
- if (!SecurityStackWalk::HasFlagsOrFullyTrusted(0))
- {
- if (Security::TypeRequiresTransparencyCheck(pMT, true))
- {
- // If we're creating a critical type, convert the critical check into a demand for full trust
- Security::SpecialDemand(SSWT_LATEBOUND_LINKDEMAND, SECURITY_FULL_TRUST);
- }
- }
-#else
if (Security::TypeRequiresTransparencyCheck(pMT))
{
// The AccessCheckOptions flag doesn't matter because we just need to get the caller.
@@ -1210,7 +1198,6 @@ void ArrayNative::CheckElementType(TypeHandle elementType)
accessCheckOptions.DemandMemberAccessOrFail(&sCtx, pMT, FALSE /*visibilityCheck*/);
}
-#endif // !FEATURE_CORECLR
// Check for byref-like types.
if (pMT->IsByRefLike())
diff --git a/src/classlibnative/bcltype/number.cpp b/src/classlibnative/bcltype/number.cpp
index 3f2d63c70e..34169a77ed 100644
--- a/src/classlibnative/bcltype/number.cpp
+++ b/src/classlibnative/bcltype/number.cpp
@@ -1294,14 +1294,6 @@ STRINGREF NumberToString(NUMBER* number, wchar format, int nMaxDigits, NUMFMTREF
STRINGREF sZero=NULL;
// @TODO what if not sequential?
-#ifndef FEATURE_CORECLR
- if (numfmt->iDigitSubstitution == 2) // native digits
- {
- PTRARRAYREF aDigits = numfmt->sNativeDigits;
- if (aDigits!=NULL && aDigits->GetNumComponents()>0)
- sZero=(STRINGREF)aDigits->GetAt(0);
- }
-#endif
// Do the worst case calculation
/* US English - for Double.MinValue.ToString("C99"); we require 514 characters
@@ -2557,51 +2549,6 @@ FCIMPL3_VII(Object*, COMNumber::FormatUInt64, UINT64 value, StringObject* format
}
FCIMPLEND
-#if !defined(FEATURE_CORECLR)
-//
-// Used by base types that are not in mscorlib.dll (such as System.Numerics.BigInteger in System.Core.dll)
-// Note that the allDigits buffer must be fixed across this call or you will introduce a GC Hole.
-//
-FCIMPL4(Object*, COMNumber::FormatNumberBuffer, BYTE* number, StringObject* formatUNSAFE, NumberFormatInfo* numfmtUNSAFE, __in_z wchar_t* allDigits)
-{
- FCALL_CONTRACT;
-
- wchar fmt;
- int digits;
- NUMBER* pNumber;
-
- struct _gc
- {
- STRINGREF refFormat;
- NUMFMTREF refNumFmt;
- STRINGREF refRetString;
- } gc;
-
- gc.refFormat = ObjectToSTRINGREF(formatUNSAFE);
- gc.refNumFmt = (NUMFMTREF)numfmtUNSAFE;
- gc.refRetString = NULL;
-
- HELPER_METHOD_FRAME_BEGIN_RET_PROTECT(gc);
- if (gc.refNumFmt == 0) COMPlusThrowArgumentNull(W("NumberFormatInfo"));
-
- pNumber = (NUMBER*) number;
-
- pNumber->allDigits = allDigits;
-
- fmt = ParseFormatSpecifier(gc.refFormat, &digits);
- if (fmt != 0) {
- gc.refRetString = NumberToString(pNumber, fmt, digits, gc.refNumFmt);
- }
- else {
- gc.refRetString = NumberToStringFormat(pNumber, gc.refFormat, gc.refNumFmt);
- }
- HELPER_METHOD_FRAME_END();
-
- return OBJECTREFToObject(gc.refRetString);
-}
-FCIMPLEND
-
-#endif // !FEATURE_CORECLR
FCIMPL2(FC_BOOL_RET, COMNumber::NumberBufferToDecimal, BYTE* number, DECIMAL* value)
{
diff --git a/src/classlibnative/bcltype/number.h b/src/classlibnative/bcltype/number.h
index 87bab3b9f6..db66435117 100644
--- a/src/classlibnative/bcltype/number.h
+++ b/src/classlibnative/bcltype/number.h
@@ -33,9 +33,6 @@ public:
static FCDECL3(Object*, FormatUInt32, UINT32 value, StringObject* formatUNSAFE, NumberFormatInfo* numfmtUNSAFE);
static FCDECL3_VII(Object*, FormatInt64, INT64 value, StringObject* formatUNSAFE, NumberFormatInfo* numfmtUNSAFE);
static FCDECL3_VII(Object*, FormatUInt64, UINT64 value, StringObject* formatUNSAFE, NumberFormatInfo* numfmtUNSAFE);
-#if !defined(FEATURE_CORECLR)
- static FCDECL4(Object*, FormatNumberBuffer, BYTE* number, StringObject* formatUNSAFE, NumberFormatInfo* numfmtUNSAFE, __in_z wchar_t* allDigits);
-#endif // !FEATURE_CORECLR
static FCDECL2(FC_BOOL_RET, NumberBufferToDecimal, BYTE* number, DECIMAL* value);
static FCDECL2(FC_BOOL_RET, NumberBufferToDouble, BYTE* number, double* value);
diff --git a/src/classlibnative/bcltype/stringnative.cpp b/src/classlibnative/bcltype/stringnative.cpp
index 1e6b132b17..af6593a6be 100644
--- a/src/classlibnative/bcltype/stringnative.cpp
+++ b/src/classlibnative/bcltype/stringnative.cpp
@@ -160,12 +160,7 @@ FCIMPLEND
inline COMNlsHashProvider * GetCurrentNlsHashProvider()
{
LIMITED_METHOD_CONTRACT;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
- return curDomain->m_pNlsHashProvider;
-#else
return &COMNlsHashProvider::s_NlsHashProvider;
-#endif // FEATURE_CORECLR
}
FCIMPL3(INT32, COMString::Marvin32HashString, StringObject* thisRefUNSAFE, INT32 strLen, INT64 additionalEntropy) {
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp
index 8bb3409974..c1d85c45e9 100644
--- a/src/classlibnative/bcltype/system.cpp
+++ b/src/classlibnative/bcltype/system.cpp
@@ -31,9 +31,6 @@
#include "array.h"
#include "eepolicy.h"
-#if !defined(FEATURE_CORECLR)
-#include "metahost.h"
-#endif // !FEATURE_CORECLR
#ifdef FEATURE_WINDOWSPHONE
Volatile<BOOL> g_fGetPhoneVersionInitialized;
@@ -83,20 +80,6 @@ FCIMPLEND;
-#ifndef FEATURE_CORECLR
-INT64 QCALLTYPE SystemNative::GetWorkingSet()
-{
- QCALL_CONTRACT;
-
- DWORD memUsage = 0;
-
- BEGIN_QCALL;
- memUsage = WszGetWorkingSet();
- END_QCALL;
-
- return memUsage;
-}
-#endif // !FEATURE_CORECLR
VOID QCALLTYPE SystemNative::Exit(INT32 exitcode)
{
@@ -377,24 +360,6 @@ FCIMPL0(StringObject*, SystemNative::GetHostBindingFile);
}
FCIMPLEND
-#ifndef FEATURE_CORECLR
-
-void QCALLTYPE SystemNative::_GetSystemVersion(QCall::StringHandleOnStack retVer)
-{
- QCALL_CONTRACT;
- BEGIN_QCALL;
-
- WCHAR wszVersion[_MAX_PATH];
- DWORD dwVersion = _MAX_PATH;
-
- // Get the version
- IfFailThrow(g_pCLRRuntime->GetVersionString(wszVersion, &dwVersion));
- retVer.Set(wszVersion);
-
- END_QCALL;
-}
-
-#endif
INT32 QCALLTYPE SystemNative::GetProcessorCount()
{
@@ -439,16 +404,7 @@ LPVOID QCALLTYPE SystemNative::GetRuntimeInterfaceImpl(
BEGIN_QCALL;
-#ifdef FEATURE_CORECLR
IfFailThrow(E_NOINTERFACE);
-#else
- HRESULT hr = g_pCLRRuntime->GetInterface(clsid, riid, &pUnk);
-
- if (FAILED(hr))
- hr = g_pCLRRuntime->QueryInterface(riid, &pUnk);
-
- IfFailThrow(hr);
-#endif
END_QCALL;
@@ -560,11 +516,9 @@ void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExce
#ifndef FEATURE_PAL
// If we have the exception object, then try to setup
// the watson bucket if it has any details.
-#ifdef FEATURE_CORECLR
// On CoreCLR, Watson may not be enabled. Thus, we should
// skip this, if required.
if (IsWatsonEnabled())
-#endif // FEATURE_CORECLR
{
BEGIN_SO_INTOLERANT_CODE(pThread);
if ((gc.refExceptionForWatsonBucketing == NULL) || !SetupWatsonBucketsForFailFast(gc.refExceptionForWatsonBucketing))
@@ -650,34 +604,6 @@ FCIMPL2(VOID, SystemNative::FailFastWithException, StringObject* refMessageUNSAF
FCIMPLEND
-#ifndef FEATURE_CORECLR
-BOOL QCALLTYPE SystemNative::IsCLRHosted()
-{
- QCALL_CONTRACT;
-
- BOOL retVal = false;
- BEGIN_QCALL;
- retVal = (CLRHosted() & CLRHOSTED) != 0;
- END_QCALL;
-
- return retVal;
-}
-
-void QCALLTYPE SystemNative::TriggerCodeContractFailure(ContractFailureKind failureKind, LPCWSTR pMessage, LPCWSTR pCondition, LPCWSTR exceptionAsString)
-{
- QCALL_CONTRACT;
-
- BEGIN_QCALL;
-
- GCX_COOP();
-
- EEPolicy::HandleCodeContractFailure(pMessage, pCondition, exceptionAsString);
- // Note: if the host chose to throw an exception, we've returned from this method and
- // will throw that exception in managed code, because it's easier to pass the right parameters there.
-
- END_QCALL;
-}
-#endif // !FEATURE_CORECLR
FCIMPL0(FC_BOOL_RET, SystemNative::IsServerGC)
{
@@ -795,104 +721,7 @@ FCIMPL1(FC_BOOL_RET, SystemNative::GetOSVersionEx, OSVERSIONINFOEXObject *osVer)
FCIMPLEND
-#ifndef FEATURE_CORECLR
-//
-// SystemNative::LegacyFormatMode - Fcall implementation for System.TimeSpan.LegacyFormatMode
-// checks for the DWORD "TimeSpan_LegacyFormatMode" CLR config option
-//
-FCIMPL0(FC_BOOL_RET, SystemNative::LegacyFormatMode)
-{
- FCALL_CONTRACT;
-
- DWORD flag = 0;
-
- BEGIN_SO_INTOLERANT_CODE_NOTHROW(GetThread(), FCThrow(kStackOverflowException));
- flag = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_TimeSpan_LegacyFormatMode);
- END_SO_INTOLERANT_CODE;
-
- if (flag)
- FC_RETURN_BOOL(TRUE);
- else
- FC_RETURN_BOOL(FALSE);
-}
-FCIMPLEND
-#endif // !FEATURE_CORECLR
-#ifndef FEATURE_CORECLR
-//
-// SystemNative::CheckLegacyManagedDeflateStream - Fcall implementation for System.IO.Compression.DeflateStream
-// checks for the DWORD "NetFx45_LegacyManagedDeflateStream" CLR config option
-//
-// Move this into a separate CLRConfigQCallWrapper class once CLRConfig has been refactored!
-//
-FCIMPL0(FC_BOOL_RET, SystemNative::CheckLegacyManagedDeflateStream)
-{
- FCALL_CONTRACT;
-
- DWORD flag = 0;
-
- BEGIN_SO_INTOLERANT_CODE_NOTHROW(GetThread(), FCThrow(kStackOverflowException));
- flag = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_NetFx45_LegacyManagedDeflateStream);
- END_SO_INTOLERANT_CODE;
-
- if (flag)
- FC_RETURN_BOOL(TRUE);
- else
- FC_RETURN_BOOL(FALSE);
-}
-FCIMPLEND
-#endif // !FEATURE_CORECLR
-
-#ifndef FEATURE_CORECLR
-//
-// SystemNative::CheckThrowUnobservedTaskExceptions - Fcall implementation for System.Threading.Tasks.TaskExceptionHolder
-// checks for the DWORD "ThrowUnobservedTaskExceptions" CLR config option
-//
-FCIMPL0(FC_BOOL_RET, SystemNative::CheckThrowUnobservedTaskExceptions)
-{
- FCALL_CONTRACT;
-
- DWORD flag = 0;
-
- BEGIN_SO_INTOLERANT_CODE_NOTHROW(GetThread(), FCThrow(kStackOverflowException));
- flag = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_ThrowUnobservedTaskExceptions);
- END_SO_INTOLERANT_CODE;
-
- if (flag)
- FC_RETURN_BOOL(TRUE);
- else
- FC_RETURN_BOOL(FALSE);
-}
-FCIMPLEND
-
-BOOL QCALLTYPE SystemNative::LegacyDateTimeParseMode()
-{
- QCALL_CONTRACT;
-
- BOOL retVal = false;
- BEGIN_QCALL;
- retVal = (BOOL) CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_DateTime_NetFX35ParseMode);
- END_QCALL;
-
- return retVal;
-}
-
-//
-// This method used with DateTimeParse to fix the parsing of AM/PM like "1/10 5 AM" case
-//
-BOOL QCALLTYPE SystemNative::EnableAmPmParseAdjustment()
-{
- QCALL_CONTRACT;
-
- BOOL retVal = false;
- BEGIN_QCALL;
- retVal = (BOOL) CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_DateTime_NetFX40AmPmParseAdjustment);
- END_QCALL;
-
- return retVal;
-}
-
-#endif // !FEATURE_CORECLR
diff --git a/src/classlibnative/bcltype/system.h b/src/classlibnative/bcltype/system.h
index 9edc595039..1da105841f 100644
--- a/src/classlibnative/bcltype/system.h
+++ b/src/classlibnative/bcltype/system.h
@@ -77,10 +77,6 @@ public:
static FCDECL1(FC_BOOL_RET, GetOSVersion, OSVERSIONINFOObject *osVer);
static FCDECL1(FC_BOOL_RET, GetOSVersionEx, OSVERSIONINFOEXObject *osVer);
-#ifndef FEATURE_CORECLR
- static
- INT64 QCALLTYPE GetWorkingSet();
-#endif // !FEATURE_CORECLR
static
void QCALLTYPE Exit(INT32 exitcode);
@@ -96,10 +92,6 @@ public:
static FCDECL1(VOID, FailFast, StringObject* refMessageUNSAFE);
static FCDECL2(VOID, FailFastWithExitCode, StringObject* refMessageUNSAFE, UINT exitCode);
static FCDECL2(VOID, FailFastWithException, StringObject* refMessageUNSAFE, ExceptionObject* refExceptionUNSAFE);
-#ifndef FEATURE_CORECLR
- static void QCALLTYPE TriggerCodeContractFailure(ContractFailureKind failureKind, LPCWSTR pMessage, LPCWSTR pCondition, LPCWSTR exceptionAsText);
- static BOOL QCALLTYPE IsCLRHosted();
-#endif // !FEATURE_CORECLR
static FCDECL0(StringObject*, GetDeveloperPath);
static FCDECL1(Object*, _GetEnvironmentVariable, StringObject* strVar);
@@ -123,23 +115,10 @@ public:
// Return a method info for the method were the exception was thrown
static FCDECL1(ReflectMethodObject*, GetMethodFromStackTrace, ArrayBase* pStackTraceUNSAFE);
-#ifndef FEATURE_CORECLR
- // Functions on the System.TimeSpan class
- static FCDECL0(FC_BOOL_RET, LegacyFormatMode);
- // Function on the DateTime
- static BOOL QCALLTYPE EnableAmPmParseAdjustment();
- static BOOL QCALLTYPE LegacyDateTimeParseMode();
-#endif // !FEATURE_CORECLR
// Move this into a separate CLRConfigQCallWrapper class once CLRConfif has been refactored:
-#ifndef FEATURE_CORECLR
- static FCDECL0(FC_BOOL_RET, CheckLegacyManagedDeflateStream);
-#endif // !FEATURE_CORECLR
-#ifndef FEATURE_CORECLR
- static FCDECL0(FC_BOOL_RET, CheckThrowUnobservedTaskExceptions);
-#endif // !FEATURE_CORECLR
private:
// Common processing code for FailFast
diff --git a/src/classlibnative/inc/nlsinfo.h b/src/classlibnative/inc/nlsinfo.h
index a5dc13f9a8..173edc6d97 100644
--- a/src/classlibnative/inc/nlsinfo.h
+++ b/src/classlibnative/inc/nlsinfo.h
@@ -85,9 +85,7 @@ public:
static BOOL QCALLTYPE InternalGetSystemDefaultUILanguage(QCall::StringHandleOnStack systemDefaultUiLanguage);
// Added but disabled from desktop in .NET 4.0, stayed disabled in .NET 4.5
-#ifdef FEATURE_CORECLR
static FCDECL0(Object*, nativeGetResourceFallbackArray);
-#endif
//
// Native helper functions for methods in DateTimeFormatInfo
@@ -111,11 +109,6 @@ public:
static INT_PTR QCALLTYPE InternalInitSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
static INT_PTR InitSortHandleHelper(LPCWSTR localeName, INT_PTR* handleOrigin);
static INT_PTR InternalInitOsSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
-#ifndef FEATURE_CORECLR
- static INT_PTR InternalInitVersionedSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
- static INT_PTR InternalInitVersionedSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin, DWORD sortVersion);
- static DWORD QCALLTYPE InternalGetSortVersion();
-#endif
static BOOL QCALLTYPE InternalGetNlsVersionEx(INT_PTR handle, INT_PTR handleOrigin, LPCWSTR lpLocaleName, NLSVERSIONINFOEX * lpVersionInformation);
//
diff --git a/src/classlibnative/nls/encodingdata.cpp b/src/classlibnative/nls/encodingdata.cpp
index bf5c73fd63..c6021256be 100644
--- a/src/classlibnative/nls/encodingdata.cpp
+++ b/src/classlibnative/nls/encodingdata.cpp
@@ -17,7 +17,6 @@
//
// Please KEEP this table SORTED ALPHABETICALLY! We do a binary search on this array.
const EncodingDataItem COMNlsInfo::EncodingDataTable[] = {
-#ifdef FEATURE_CORECLR
// encoding name, codepage.
{"ANSI_X3.4-1968", 20127 },
{"ANSI_X3.4-1986", 20127 },
@@ -63,429 +62,6 @@ const EncodingDataItem COMNlsInfo::EncodingDataTable[] = {
{"x-unicode-1-1-utf-8", 65001 },
{"x-unicode-2-0-utf-7", 65000 },
{"x-unicode-2-0-utf-8", 65001 },
-#else
- // Total Items: 455
-// encoding name, codepage.
-{"437", 437},
-{"ANSI_X3.4-1968", 20127},
-{"ANSI_X3.4-1986", 20127},
-// {L"_autodetect", 50932},
-// {L"_autodetect_all", 50001},
-// {L"_autodetect_kr", 50949},
-{"arabic", 28596},
-{"ascii", 20127},
-{"ASMO-708", 708},
-{"Big5", 950},
-{"Big5-HKSCS", 950},
-{"CCSID00858", 858},
-{"CCSID00924", 20924},
-{"CCSID01140", 1140},
-{"CCSID01141", 1141},
-{"CCSID01142", 1142},
-{"CCSID01143", 1143},
-{"CCSID01144", 1144},
-{"CCSID01145", 1145},
-{"CCSID01146", 1146},
-{"CCSID01147", 1147},
-{"CCSID01148", 1148},
-{"CCSID01149", 1149},
-{"chinese", 936},
-{"cn-big5", 950},
-{"CN-GB", 936},
-{"CP00858", 858},
-{"CP00924", 20924},
-{"CP01140", 1140},
-{"CP01141", 1141},
-{"CP01142", 1142},
-{"CP01143", 1143},
-{"CP01144", 1144},
-{"CP01145", 1145},
-{"CP01146", 1146},
-{"CP01147", 1147},
-{"CP01148", 1148},
-{"CP01149", 1149},
-{"cp037", 37},
-{"cp1025", 21025},
-{"CP1026", 1026},
-{"cp1256", 1256},
-{"CP273", 20273},
-{"CP278", 20278},
-{"CP280", 20280},
-{"CP284", 20284},
-{"CP285", 20285},
-{"cp290", 20290},
-{"cp297", 20297},
-{"cp367", 20127},
-{"cp420", 20420},
-{"cp423", 20423},
-{"cp424", 20424},
-{"cp437", 437},
-{"CP500", 500},
-{"cp50227", 50227},
- //{L"cp50229", 50229},
-{"cp819", 28591},
-{"cp850", 850},
-{"cp852", 852},
-{"cp855", 855},
-{"cp857", 857},
-{"cp858", 858},
-{"cp860", 860},
-{"cp861", 861},
-{"cp862", 862},
-{"cp863", 863},
-{"cp864", 864},
-{"cp865", 865},
-{"cp866", 866},
-{"cp869", 869},
-{"CP870", 870},
-{"CP871", 20871},
-{"cp875", 875},
-{"cp880", 20880},
-{"CP905", 20905},
-//{L"cp930", 50930},
-//{L"cp933", 50933},
-//{L"cp935", 50935},
-//{L"cp937", 50937},
-//{L"cp939", 50939},
-{"csASCII", 20127},
-{"csbig5", 950},
-{"csEUCKR", 51949},
-{"csEUCPkdFmtJapanese", 51932},
-{"csGB2312", 936},
-{"csGB231280", 936},
-{"csIBM037", 37},
-{"csIBM1026", 1026},
-{"csIBM273", 20273},
-{"csIBM277", 20277},
-{"csIBM278", 20278},
-{"csIBM280", 20280},
-{"csIBM284", 20284},
-{"csIBM285", 20285},
-{"csIBM290", 20290},
-{"csIBM297", 20297},
-{"csIBM420", 20420},
-{"csIBM423", 20423},
-{"csIBM424", 20424},
-{"csIBM500", 500},
-{"csIBM870", 870},
-{"csIBM871", 20871},
-{"csIBM880", 20880},
-{"csIBM905", 20905},
-{"csIBMThai", 20838},
-{"csISO2022JP", 50221},
-{"csISO2022KR", 50225},
-{"csISO58GB231280", 936},
-{"csISOLatin1", 28591},
-{"csISOLatin2", 28592},
-{"csISOLatin3", 28593},
-{"csISOLatin4", 28594},
-{"csISOLatin5", 28599},
-{"csISOLatin9", 28605},
-{"csISOLatinArabic", 28596},
-{"csISOLatinCyrillic", 28595},
-{"csISOLatinGreek", 28597},
-{"csISOLatinHebrew", 28598},
-{"csKOI8R", 20866},
-{"csKSC56011987", 949},
-{"csPC8CodePage437", 437},
-{"csShiftJIS", 932},
-{"csUnicode11UTF7", 65000},
-{"csWindows31J", 932},
-{"cyrillic", 28595},
-{"DIN_66003", 20106},
-{"DOS-720", 720},
-{"DOS-862", 862},
-{"DOS-874", 874},
-{"ebcdic-cp-ar1", 20420},
-{"ebcdic-cp-be", 500},
-{"ebcdic-cp-ca", 37},
-{"ebcdic-cp-ch", 500},
-{"EBCDIC-CP-DK", 20277},
-{"ebcdic-cp-es", 20284},
-{"ebcdic-cp-fi", 20278},
-{"ebcdic-cp-fr", 20297},
-{"ebcdic-cp-gb", 20285},
-{"ebcdic-cp-gr", 20423},
-{"ebcdic-cp-he", 20424},
-{"ebcdic-cp-is", 20871},
-{"ebcdic-cp-it", 20280},
-{"ebcdic-cp-nl", 37},
-{"EBCDIC-CP-NO", 20277},
-{"ebcdic-cp-roece", 870},
-{"ebcdic-cp-se", 20278},
-{"ebcdic-cp-tr", 20905},
-{"ebcdic-cp-us", 37},
-{"ebcdic-cp-wt", 37},
-{"ebcdic-cp-yu", 870},
-{"EBCDIC-Cyrillic", 20880},
-{"ebcdic-de-273+euro", 1141},
-{"ebcdic-dk-277+euro", 1142},
-{"ebcdic-es-284+euro", 1145},
-{"ebcdic-fi-278+euro", 1143},
-{"ebcdic-fr-297+euro", 1147},
-{"ebcdic-gb-285+euro", 1146},
-{"ebcdic-international-500+euro", 1148},
-{"ebcdic-is-871+euro", 1149},
-{"ebcdic-it-280+euro", 1144},
-{"EBCDIC-JP-kana", 20290},
-{"ebcdic-Latin9--euro", 20924},
-{"ebcdic-no-277+euro", 1142},
-{"ebcdic-se-278+euro", 1143},
-{"ebcdic-us-37+euro", 1140},
-{"ECMA-114", 28596},
-{"ECMA-118", 28597},
-{"ELOT_928", 28597},
-{"euc-cn", 51936},
-{"euc-jp", 51932},
-{"euc-kr", 51949},
-{"Extended_UNIX_Code_Packed_Format_for_Japanese", 51932},
-{"GB18030", 54936},
-{"GB2312", 936},
-{"GB2312-80", 936},
-{"GB231280", 936},
-{"GBK", 936},
-{"GB_2312-80", 936},
-{"German", 20106},
-{"greek", 28597},
-{"greek8", 28597},
-{"hebrew", 28598},
-{"hz-gb-2312", 52936},
-{"IBM-Thai", 20838},
-{"IBM00858", 858},
-{"IBM00924", 20924},
-{"IBM01047", 1047},
-{"IBM01140", 1140},
-{"IBM01141", 1141},
-{"IBM01142", 1142},
-{"IBM01143", 1143},
-{"IBM01144", 1144},
-{"IBM01145", 1145},
-{"IBM01146", 1146},
-{"IBM01147", 1147},
-{"IBM01148", 1148},
-{"IBM01149", 1149},
-{"IBM037", 37},
-{"IBM1026", 1026},
-{"IBM273", 20273},
-{"IBM277", 20277},
-{"IBM278", 20278},
-{"IBM280", 20280},
-{"IBM284", 20284},
-{"IBM285", 20285},
-{"IBM290", 20290},
-{"IBM297", 20297},
-{"IBM367", 20127},
-{"IBM420", 20420},
-{"IBM423", 20423},
-{"IBM424", 20424},
-{"IBM437", 437},
-{"IBM500", 500},
-{"ibm737", 737},
-{"ibm775", 775},
-{"ibm819", 28591},
-{"IBM850", 850},
-{"IBM852", 852},
-{"IBM855", 855},
-{"IBM857", 857},
-{"IBM860", 860},
-{"IBM861", 861},
-{"IBM862", 862},
-{"IBM863", 863},
-{"IBM864", 864},
-{"IBM865", 865},
-{"IBM866", 866},
-{"IBM869", 869},
-{"IBM870", 870},
-{"IBM871", 20871},
-{"IBM880", 20880},
-{"IBM905", 20905},
-{"irv", 20105},
-{"ISO-10646-UCS-2", 1200},
-{"iso-2022-jp", 50220},
-{"iso-2022-jpeuc", 51932},
-{"iso-2022-kr", 50225},
-{"iso-2022-kr-7", 50225},
-{"iso-2022-kr-7bit", 50225},
-{"iso-2022-kr-8", 51949},
-{"iso-2022-kr-8bit", 51949},
-{"iso-8859-1", 28591},
-{"iso-8859-11", 874},
-{"iso-8859-13", 28603},
-{"iso-8859-15", 28605},
-{"iso-8859-2", 28592},
-{"iso-8859-3", 28593},
-{"iso-8859-4", 28594},
-{"iso-8859-5", 28595},
-{"iso-8859-6", 28596},
-{"iso-8859-7", 28597},
-{"iso-8859-8", 28598},
-{"ISO-8859-8 Visual", 28598},
-{"iso-8859-8-i", 38598},
-{"iso-8859-9", 28599},
-{"iso-ir-100", 28591},
-{"iso-ir-101", 28592},
-{"iso-ir-109", 28593},
-{"iso-ir-110", 28594},
-{"iso-ir-126", 28597},
-{"iso-ir-127", 28596},
-{"iso-ir-138", 28598},
-{"iso-ir-144", 28595},
-{"iso-ir-148", 28599},
-{"iso-ir-149", 949},
-{"iso-ir-58", 936},
-{"iso-ir-6", 20127},
-{"ISO646-US", 20127},
-{"iso8859-1", 28591},
-{"iso8859-2", 28592},
-{"ISO_646.irv:1991", 20127},
-{"iso_8859-1", 28591},
-{"ISO_8859-15", 28605},
-{"iso_8859-1:1987", 28591},
-{"iso_8859-2", 28592},
-{"iso_8859-2:1987", 28592},
-{"ISO_8859-3", 28593},
-{"ISO_8859-3:1988", 28593},
-{"ISO_8859-4", 28594},
-{"ISO_8859-4:1988", 28594},
-{"ISO_8859-5", 28595},
-{"ISO_8859-5:1988", 28595},
-{"ISO_8859-6", 28596},
-{"ISO_8859-6:1987", 28596},
-{"ISO_8859-7", 28597},
-{"ISO_8859-7:1987", 28597},
-{"ISO_8859-8", 28598},
-{"ISO_8859-8:1988", 28598},
-{"ISO_8859-9", 28599},
-{"ISO_8859-9:1989", 28599},
-{"Johab", 1361},
-{"koi", 20866},
-{"koi8", 20866},
-{"koi8-r", 20866},
-{"koi8-ru", 21866},
-{"koi8-u", 21866},
-{"koi8r", 20866},
-{"korean", 949},
-{"ks-c-5601", 949},
-{"ks-c5601", 949},
-{"KSC5601", 949},
-{"KSC_5601", 949},
-{"ks_c_5601", 949},
-{"ks_c_5601-1987", 949},
-{"ks_c_5601-1989", 949},
-{"ks_c_5601_1987", 949},
-{"l1", 28591},
-{"l2", 28592},
-{"l3", 28593},
-{"l4", 28594},
-{"l5", 28599},
-{"l9", 28605},
-{"latin1", 28591},
-{"latin2", 28592},
-{"latin3", 28593},
-{"latin4", 28594},
-{"latin5", 28599},
-{"latin9", 28605},
-{"logical", 28598},
-{"macintosh", 10000},
-{"ms_Kanji", 932},
-{"Norwegian", 20108},
-{"NS_4551-1", 20108},
-{"PC-Multilingual-850+euro", 858},
-{"SEN_850200_B", 20107},
-{"shift-jis", 932},
-{"shift_jis", 932},
-{"sjis", 932},
-{"Swedish", 20107},
-{"TIS-620", 874},
-{"ucs-2", 1200},
-{"unicode", 1200},
-{"unicode-1-1-utf-7", 65000},
-{"unicode-1-1-utf-8", 65001},
-{"unicode-2-0-utf-7", 65000},
-{"unicode-2-0-utf-8", 65001},
-// People get confused about the FFFE here. We can't change this because it'd break existing apps.
-// This has been this way for a long time, including in Mlang.
-{"unicodeFFFE", 1201}, // Big Endian, BOM seems backwards, think of the BOM in little endian order.
-{"us", 20127},
-{"us-ascii", 20127},
-{"utf-16", 1200},
-{"UTF-16BE", 1201},
-{"UTF-16LE", 1200},
-{"utf-32", 12000},
-{"UTF-32BE", 12001},
-{"UTF-32LE", 12000},
-{"utf-7", 65000},
-{"utf-8", 65001},
-{"visual", 28598},
-{"windows-1250", 1250},
-{"windows-1251", 1251},
-{"windows-1252", 1252},
-{"windows-1253", 1253},
-{"Windows-1254", 1254},
-{"windows-1255", 1255},
-{"windows-1256", 1256},
-{"windows-1257", 1257},
-{"windows-1258", 1258},
-{"windows-874", 874},
-{"x-ansi", 1252},
-{"x-Chinese-CNS", 20000},
-{"x-Chinese-Eten", 20002},
-{"x-cp1250", 1250},
-{"x-cp1251", 1251},
-{"x-cp20001", 20001},
-{"x-cp20003", 20003},
-{"x-cp20004", 20004},
-{"x-cp20005", 20005},
-{"x-cp20261", 20261},
-{"x-cp20269", 20269},
-{"x-cp20936", 20936},
-{"x-cp20949", 20949},
-{"x-cp50227", 50227},
-//{L"x-cp50229", 50229},
-//{L"X-EBCDIC-JapaneseAndUSCanada", 50931},
-{"X-EBCDIC-KoreanExtended", 20833},
-{"x-euc", 51932},
-{"x-euc-cn", 51936},
-{"x-euc-jp", 51932},
-{"x-Europa", 29001},
-{"x-IA5", 20105},
-{"x-IA5-German", 20106},
-{"x-IA5-Norwegian", 20108},
-{"x-IA5-Swedish", 20107},
-{"x-iscii-as", 57006},
-{"x-iscii-be", 57003},
-{"x-iscii-de", 57002},
-{"x-iscii-gu", 57010},
-{"x-iscii-ka", 57008},
-{"x-iscii-ma", 57009},
-{"x-iscii-or", 57007},
-{"x-iscii-pa", 57011},
-{"x-iscii-ta", 57004},
-{"x-iscii-te", 57005},
-{"x-mac-arabic", 10004},
-{"x-mac-ce", 10029},
-{"x-mac-chinesesimp", 10008},
-{"x-mac-chinesetrad", 10002},
-{"x-mac-croatian", 10082},
-{"x-mac-cyrillic", 10007},
-{"x-mac-greek", 10006},
-{"x-mac-hebrew", 10005},
-{"x-mac-icelandic", 10079},
-{"x-mac-japanese", 10001},
-{"x-mac-korean", 10003},
-{"x-mac-romanian", 10010},
-{"x-mac-thai", 10021},
-{"x-mac-turkish", 10081},
-{"x-mac-ukrainian", 10017},
-{"x-ms-cp932", 932},
-{"x-sjis", 932},
-{"x-unicode-1-1-utf-7", 65000},
-{"x-unicode-1-1-utf-8", 65001},
-{"x-unicode-2-0-utf-7", 65000},
-{"x-unicode-2-0-utf-8", 65001},
-{"x-x-big5", 950},
-
-#endif // FEATURE_CORECLR
};
@@ -503,7 +79,6 @@ const int COMNlsInfo::m_nEncodingDataTableItems =
//
const CodePageDataItem COMNlsInfo::CodePageDataTable[] = {
-#ifdef FEATURE_CORECLR
// Total Items:
// code page, family code page, web name, header name, body name, flags
@@ -517,160 +92,6 @@ const CodePageDataItem COMNlsInfo::CodePageDataTable[] = {
MapCodePageDataItem( 65000, 1200, "utf-7", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Unicode (UTF-7)"
MapCodePageDataItem( 65001, 1200, "utf-8", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Unicode (UTF-8)"
-#else //FEATURE_CORECLR
-
-// Total Items: 146
-// code page, family code page, web name, header name, body name, flags
-
-
- MapCodePageDataItem( 37, 1252, "IBM037", 0), // "IBM EBCDIC (US-Canada)"
- MapCodePageDataItem( 437, 1252, "IBM437", 0), // "OEM United States"
- MapCodePageDataItem( 500, 1252, "IBM500", 0), // "IBM EBCDIC (International)"
- MapCodePageDataItem( 708, 1256, "ASMO-708", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Arabic (ASMO 708)"
- MapCodePageDataItem( 720, 1256, "DOS-720", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Arabic (DOS)"
- MapCodePageDataItem( 737, 1253, "ibm737", 0), // "Greek (DOS)"
- MapCodePageDataItem( 775, 1257, "ibm775", 0), // "Baltic (DOS)"
- MapCodePageDataItem( 850, 1252, "ibm850", 0), // "Western European (DOS)"
- MapCodePageDataItem( 852, 1250, "ibm852", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Central European (DOS)"
- MapCodePageDataItem( 855, 1252, "IBM855", 0), // "OEM Cyrillic"
- MapCodePageDataItem( 857, 1254, "ibm857", 0), // "Turkish (DOS)"
- MapCodePageDataItem( 858, 1252, "IBM00858", 0), // "OEM Multilingual Latin I"
- MapCodePageDataItem( 860, 1252, "IBM860", 0), // "Portuguese (DOS)"
- MapCodePageDataItem( 861, 1252, "ibm861", 0), // "Icelandic (DOS)"
- MapCodePageDataItem( 862, 1255, "DOS-862", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Hebrew (DOS)"
- MapCodePageDataItem( 863, 1252, "IBM863", 0), // "French Canadian (DOS)"
- MapCodePageDataItem( 864, 1256, "IBM864", 0), // "Arabic (864)"
- MapCodePageDataItem( 865, 1252, "IBM865", 0), // "Nordic (DOS)"
- MapCodePageDataItem( 866, 1251, "cp866", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Cyrillic (DOS)"
- MapCodePageDataItem( 869, 1253, "ibm869", 0), // "Greek, Modern (DOS)"
- MapCodePageDataItem( 870, 1250, "IBM870", 0), // "IBM EBCDIC (Multilingual Latin-2)"
- MapCodePageDataItem( 874, 874, "windows-874", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Thai (Windows)"
- MapCodePageDataItem( 875, 1253, "cp875", 0), // "IBM EBCDIC (Greek Modern)"
- MapCodePageDataItem( 932, 932, "|shift_jis|iso-2022-jp|iso-2022-jp", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Japanese (Shift-JIS)"
- MapCodePageDataItem( 936, 936, "gb2312", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Chinese Simplified (GB2312)"
- MapCodePageDataItem( 949, 949, "ks_c_5601-1987", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Korean"
- MapCodePageDataItem( 950, 950, "big5", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Chinese Traditional (Big5)"
- MapCodePageDataItem( 1026, 1254, "IBM1026", 0), // "IBM EBCDIC (Turkish Latin-5)"
- MapCodePageDataItem( 1047, 1252, "IBM01047", 0), // "IBM Latin-1"
- MapCodePageDataItem( 1140, 1252, "IBM01140", 0), // "IBM EBCDIC (US-Canada-Euro)"
- MapCodePageDataItem( 1141, 1252, "IBM01141", 0), // "IBM EBCDIC (Germany-Euro)"
- MapCodePageDataItem( 1142, 1252, "IBM01142", 0), // "IBM EBCDIC (Denmark-Norway-Euro)"
- MapCodePageDataItem( 1143, 1252, "IBM01143", 0), // "IBM EBCDIC (Finland-Sweden-Euro)"
- MapCodePageDataItem( 1144, 1252, "IBM01144", 0), // "IBM EBCDIC (Italy-Euro)"
- MapCodePageDataItem( 1145, 1252, "IBM01145", 0), // "IBM EBCDIC (Spain-Euro)"
- MapCodePageDataItem( 1146, 1252, "IBM01146", 0), // "IBM EBCDIC (UK-Euro)"
- MapCodePageDataItem( 1147, 1252, "IBM01147", 0), // "IBM EBCDIC (France-Euro)"
- MapCodePageDataItem( 1148, 1252, "IBM01148", 0), // "IBM EBCDIC (International-Euro)"
- MapCodePageDataItem( 1149, 1252, "IBM01149", 0), // "IBM EBCDIC (Icelandic-Euro)"
- MapCodePageDataItem( 1200, 1200, "utf-16", MIMECONTF_SAVABLE_BROWSER), // "Unicode"
- MapCodePageDataItem( 1201, 1200, "utf-16BE", 0), // Big Endian, old FFFE BOM seems backwards, think of the BOM in little endian order.
- MapCodePageDataItem( 1250, 1250, "|windows-1250|windows-1250|iso-8859-2", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Central European (Windows)"
- MapCodePageDataItem( 1251, 1251, "|windows-1251|windows-1251|koi8-r", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Cyrillic (Windows)"
- MapCodePageDataItem( 1252, 1252, "|Windows-1252|Windows-1252|iso-8859-1", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Western European (Windows)"
- MapCodePageDataItem( 1253, 1253, "|windows-1253|windows-1253|iso-8859-7", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Greek (Windows)"
- MapCodePageDataItem( 1254, 1254, "|windows-1254|windows-1254|iso-8859-9", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Turkish (Windows)"
- MapCodePageDataItem( 1255, 1255, "windows-1255", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Hebrew (Windows)"
- MapCodePageDataItem( 1256, 1256, "windows-1256", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Arabic (Windows)"
- MapCodePageDataItem( 1257, 1257, "windows-1257", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Baltic (Windows)"
- MapCodePageDataItem( 1258, 1258, "windows-1258", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Vietnamese (Windows)"
- MapCodePageDataItem( 1361, 949, "Johab", 0), // "Korean (Johab)"
- MapCodePageDataItem( 10000, 1252, "macintosh", 0), // "Western European (Mac)"
- MapCodePageDataItem( 10001, 932, "x-mac-japanese", 0), // "Japanese (Mac)"
- MapCodePageDataItem( 10002, 950, "x-mac-chinesetrad", 0), // "Chinese Traditional (Mac)"
- MapCodePageDataItem( 10003, 949, "x-mac-korean", 0), // "Korean (Mac)"
- MapCodePageDataItem( 10004, 1256, "x-mac-arabic", 0), // "Arabic (Mac)"
- MapCodePageDataItem( 10005, 1255, "x-mac-hebrew", 0), // "Hebrew (Mac)"
- MapCodePageDataItem( 10006, 1253, "x-mac-greek", 0), // "Greek (Mac)"
- MapCodePageDataItem( 10007, 1251, "x-mac-cyrillic", 0), // "Cyrillic (Mac)"
- MapCodePageDataItem( 10008, 936, "x-mac-chinesesimp", 0), // "Chinese Simplified (Mac)"
- MapCodePageDataItem( 10010, 1250, "x-mac-romanian", 0), // "Romanian (Mac)"
- MapCodePageDataItem( 10017, 1251, "x-mac-ukrainian", 0), // "Ukrainian (Mac)"
- MapCodePageDataItem( 10021, 874, "x-mac-thai", 0), // "Thai (Mac)"
- MapCodePageDataItem( 10029, 1250, "x-mac-ce", 0), // "Central European (Mac)"
- MapCodePageDataItem( 10079, 1252, "x-mac-icelandic", 0), // "Icelandic (Mac)"
- MapCodePageDataItem( 10081, 1254, "x-mac-turkish", 0), // "Turkish (Mac)"
- MapCodePageDataItem( 10082, 1250, "x-mac-croatian", 0), // "Croatian (Mac)"
- MapCodePageDataItem( 12000, 1200, "utf-32", 0), // "Unicode (UTF-32)"
- MapCodePageDataItem( 12001, 1200, "utf-32BE", 0), // "Unicode (UTF-32 Big Endian)"
- MapCodePageDataItem( 20000, 950, "x-Chinese-CNS", 0), // "Chinese Traditional (CNS)"
- MapCodePageDataItem( 20001, 950, "x-cp20001", 0), // "TCA Taiwan"
- MapCodePageDataItem( 20002, 950, "x-Chinese-Eten", 0), // "Chinese Traditional (Eten)"
- MapCodePageDataItem( 20003, 950, "x-cp20003", 0), // "IBM5550 Taiwan"
- MapCodePageDataItem( 20004, 950, "x-cp20004", 0), // "TeleText Taiwan"
- MapCodePageDataItem( 20005, 950, "x-cp20005", 0), // "Wang Taiwan"
- MapCodePageDataItem( 20105, 1252, "x-IA5", 0), // "Western European (IA5)"
- MapCodePageDataItem( 20106, 1252, "x-IA5-German", 0), // "German (IA5)"
- MapCodePageDataItem( 20107, 1252, "x-IA5-Swedish", 0), // "Swedish (IA5)"
- MapCodePageDataItem( 20108, 1252, "x-IA5-Norwegian", 0), // "Norwegian (IA5)"
- MapCodePageDataItem( 20127, 1252, "us-ascii", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "US-ASCII"
- MapCodePageDataItem( 20261, 1252, "x-cp20261", 0), // "T.61"
- MapCodePageDataItem( 20269, 1252, "x-cp20269", 0), // "ISO-6937"
- MapCodePageDataItem( 20273, 1252, "IBM273", 0), // "IBM EBCDIC (Germany)"
- MapCodePageDataItem( 20277, 1252, "IBM277", 0), // "IBM EBCDIC (Denmark-Norway)"
- MapCodePageDataItem( 20278, 1252, "IBM278", 0), // "IBM EBCDIC (Finland-Sweden)"
- MapCodePageDataItem( 20280, 1252, "IBM280", 0), // "IBM EBCDIC (Italy)"
- MapCodePageDataItem( 20284, 1252, "IBM284", 0), // "IBM EBCDIC (Spain)"
- MapCodePageDataItem( 20285, 1252, "IBM285", 0), // "IBM EBCDIC (UK)"
- MapCodePageDataItem( 20290, 932, "IBM290", 0), // "IBM EBCDIC (Japanese katakana)"
- MapCodePageDataItem( 20297, 1252, "IBM297", 0), // "IBM EBCDIC (France)"
- MapCodePageDataItem( 20420, 1256, "IBM420", 0), // "IBM EBCDIC (Arabic)"
- MapCodePageDataItem( 20423, 1253, "IBM423", 0), // "IBM EBCDIC (Greek)"
- MapCodePageDataItem( 20424, 1255, "IBM424", 0), // "IBM EBCDIC (Hebrew)"
- MapCodePageDataItem( 20833, 949, "x-EBCDIC-KoreanExtended", 0), // "IBM EBCDIC (Korean Extended)"
- MapCodePageDataItem( 20838, 874, "IBM-Thai", 0), // "IBM EBCDIC (Thai)"
- MapCodePageDataItem( 20866, 1251, "koi8-r", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Cyrillic (KOI8-R)"
- MapCodePageDataItem( 20871, 1252, "IBM871", 0), // "IBM EBCDIC (Icelandic)"
- MapCodePageDataItem( 20880, 1251, "IBM880", 0), // "IBM EBCDIC (Cyrillic Russian)"
- MapCodePageDataItem( 20905, 1254, "IBM905", 0), // "IBM EBCDIC (Turkish)"
- MapCodePageDataItem( 20924, 1252, "IBM00924", 0), // "IBM Latin-1"
- MapCodePageDataItem( 20932, 932, "EUC-JP", 0), // "Japanese (JIS 0208-1990 and 0212-1990)"
- MapCodePageDataItem( 20936, 936, "x-cp20936", 0), // "Chinese Simplified (GB2312-80)"
- MapCodePageDataItem( 20949, 949, "x-cp20949", 0), // "Korean Wansung"
- MapCodePageDataItem( 21025, 1251, "cp1025", 0), // "IBM EBCDIC (Cyrillic Serbian-Bulgarian)"
- MapCodePageDataItem( 21866, 1251, "koi8-u", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Cyrillic (KOI8-U)"
- MapCodePageDataItem( 28591, 1252, "iso-8859-1", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Western European (ISO)"
- MapCodePageDataItem( 28592, 1250, "iso-8859-2", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Central European (ISO)"
- MapCodePageDataItem( 28593, 1254, "iso-8859-3", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Latin 3 (ISO)"
- MapCodePageDataItem( 28594, 1257, "iso-8859-4", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Baltic (ISO)"
- MapCodePageDataItem( 28595, 1251, "iso-8859-5", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Cyrillic (ISO)"
- MapCodePageDataItem( 28596, 1256, "iso-8859-6", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Arabic (ISO)"
- MapCodePageDataItem( 28597, 1253, "iso-8859-7", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Greek (ISO)"
- MapCodePageDataItem( 28598, 1255, "iso-8859-8", MIMECONTF_BROWSER | MIMECONTF_SAVABLE_BROWSER), // "Hebrew (ISO-Visual)"
- MapCodePageDataItem( 28599, 1254, "iso-8859-9", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Turkish (ISO)"
- MapCodePageDataItem( 28603, 1257, "iso-8859-13", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Estonian (ISO)"
- MapCodePageDataItem( 28605, 1252, "iso-8859-15", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Latin 9 (ISO)"
- MapCodePageDataItem( 29001, 1252, "x-Europa", 0), // "Europa"
- MapCodePageDataItem( 38598, 1255, "iso-8859-8-i", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Hebrew (ISO-Logical)"
- MapCodePageDataItem( 50220, 932, "iso-2022-jp", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Japanese (JIS)"
- MapCodePageDataItem( 50221, 932, "|csISO2022JP|iso-2022-jp|iso-2022-jp", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Japanese (JIS-Allow 1 byte Kana)"
- MapCodePageDataItem( 50222, 932, "iso-2022-jp", 0), // "Japanese (JIS-Allow 1 byte Kana - SO/SI)"
- MapCodePageDataItem( 50225, 949, "|iso-2022-kr|euc-kr|iso-2022-kr", MIMECONTF_MAILNEWS), // "Korean (ISO)"
- MapCodePageDataItem( 50227, 936, "x-cp50227", 0), // "Chinese Simplified (ISO-2022)"
-//MapCodePageDataItem( 50229, 950, L"x-cp50229", L"x-cp50229", L"x-cp50229", 0}, // "Chinese Traditional (ISO-2022)"
-//MapCodePageDataItem( 50930, 932, L"cp930", L"cp930", L"cp930", 0}, // "IBM EBCDIC (Japanese and Japanese Katakana)"
-//MapCodePageDataItem( 50931, 932, L"x-EBCDIC-JapaneseAndUSCanada", L"x-EBCDIC-JapaneseAndUSCanada", L"x-EBCDIC-JapaneseAndUSCanada", 0}, // "IBM EBCDIC (Japanese and US-Canada)"
-//MapCodePageDataItem( 50933, 949, L"cp933", L"cp933", L"cp933", 0}, // "IBM EBCDIC (Korean and Korean Extended)"
-//MapCodePageDataItem( 50935, 936, L"cp935", L"cp935", L"cp935", 0}, // "IBM EBCDIC (Simplified Chinese)"
-//MapCodePageDataItem( 50937, 950, L"cp937", L"cp937", L"cp937", 0}, // "IBM EBCDIC (Traditional Chinese)"
-//MapCodePageDataItem( 50939, 932, L"cp939", L"cp939", L"cp939", 0}, // "IBM EBCDIC (Japanese and Japanese-Latin)"
- MapCodePageDataItem( 51932, 932, "euc-jp", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Japanese (EUC)"
- MapCodePageDataItem( 51936, 936, "EUC-CN", 0), // "Chinese Simplified (EUC)"
- MapCodePageDataItem( 51949, 949, "euc-kr", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Korean (EUC)"
- MapCodePageDataItem( 52936, 936, "hz-gb-2312", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Chinese Simplified (HZ)"
- MapCodePageDataItem( 54936, 936, "GB18030", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Chinese Simplified (GB18030)"
- MapCodePageDataItem( 57002, 57002, "x-iscii-de", 0), // "ISCII Devanagari"
- MapCodePageDataItem( 57003, 57003, "x-iscii-be", 0), // "ISCII Bengali"
- MapCodePageDataItem( 57004, 57004, "x-iscii-ta", 0), // "ISCII Tamil"
- MapCodePageDataItem( 57005, 57005, "x-iscii-te", 0), // "ISCII Telugu"
- MapCodePageDataItem( 57006, 57006, "x-iscii-as", 0), // "ISCII Assamese"
- MapCodePageDataItem( 57007, 57007, "x-iscii-or", 0), // "ISCII Oriya"
- MapCodePageDataItem( 57008, 57008, "x-iscii-ka", 0), // "ISCII Kannada"
- MapCodePageDataItem( 57009, 57009, "x-iscii-ma", 0), // "ISCII Malayalam"
- MapCodePageDataItem( 57010, 57010, "x-iscii-gu", 0), // "ISCII Gujarati"
- MapCodePageDataItem( 57011, 57011, "x-iscii-pa", 0), // "ISCII Punjabi"
- MapCodePageDataItem( 65000, 1200, "utf-7", MIMECONTF_MAILNEWS | MIMECONTF_SAVABLE_MAILNEWS), // "Unicode (UTF-7)"
- MapCodePageDataItem( 65001, 1200, "utf-8", MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER), // "Unicode (UTF-8)"
-#endif // FEATURE_CORECLR
// End of data.
MapCodePageDataItem( 0, 0, NULL, 0),
diff --git a/src/classlibnative/nls/nlsinfo.cpp b/src/classlibnative/nls/nlsinfo.cpp
index d24e4b02d6..4a4c294551 100644
--- a/src/classlibnative/nls/nlsinfo.cpp
+++ b/src/classlibnative/nls/nlsinfo.cpp
@@ -218,20 +218,6 @@ BOOL QCALLTYPE COMNlsInfo::InternalIsSortable(INT_PTR handle, INT_PTR handleOrig
BOOL result = FALSE;
BEGIN_QCALL;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- if(!(curDomain->m_bUseOsSorting))
- {
- handle = EnsureValidSortHandle(handle, handleOrigin, localeName);
- result = SortVersioning::SortDllIsDefinedString((SortVersioning::PSORTHANDLE) handle, COMPARE_STRING, 0, string, length);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- result = (curDomain->m_pCustomSortLibrary->pIsNLSDefinedString)(COMPARE_STRING, 0, NULL, string, length);
- }
- else
-#endif
{
// Function should be COMPARE_STRING, dwFlags should be NULL, lpVersionInfo should be NULL for now
result = NewApis::IsNLSDefinedString(COMPARE_STRING, 0, NULL, string, length);
@@ -389,7 +375,6 @@ BOOL QCALLTYPE COMNlsInfo::InternalGetUserDefaultUILanguage(QCall::StringHandleO
}
// Added but disabled from desktop in .NET 4.0, stayed disabled in .NET 4.5
-#ifdef FEATURE_CORECLR
FCIMPL0(Object*, COMNlsInfo::nativeGetResourceFallbackArray)
{
CONTRACTL
@@ -452,7 +437,6 @@ FCIMPL0(Object*, COMNlsInfo::nativeGetResourceFallbackArray)
}
FCIMPLEND
-#endif // FEATURE_CORECLR
INT32 COMNlsInfo::CallGetUserDefaultUILanguage()
{
@@ -492,31 +476,8 @@ INT_PTR COMNlsInfo::EnsureValidSortHandle(INT_PTR handle, INT_PTR handleOrigin,
{
LIMITED_METHOD_CONTRACT;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- if(!(curDomain->m_bUseOsSorting) && handleOrigin == (INT_PTR) SortVersioning::GetSortHandle && ((SortVersioning::PSORTHANDLE) handle)->dwNLSVersion == curDomain->m_sortVersion)
- {
- return handle;
- }
-
- if(curDomain->m_bUseOsSorting && curDomain->m_pCustomSortLibrary == NULL && handleOrigin == (INT_PTR) NewApis::LCMapStringEx)
- {
- return handle;
- }
-
- if(curDomain->m_bUseOsSorting && curDomain->m_pCustomSortLibrary != NULL && handleOrigin == (INT_PTR) curDomain->m_pCustomSortLibrary->pLCMapStringEx)
- {
- return handle;
- }
-
- // At this point, we can't reuse the sort handle (it has different sort semantics than this domain) so we need to get a new one.
- INT_PTR newHandleOrigin;
- return InitSortHandleHelper(localeName, &newHandleOrigin);
-#else
// For CoreCLR, on Windows 8 and up the handle will be valid. on downlevels the handle will be null
return handle;
-#endif
}
#ifdef FEATURE_SYNTHETIC_CULTURES
@@ -569,45 +530,6 @@ INT32 COMNlsInfo::WstrToInteger4(
#endif // FEATURE_SYNTHETIC_CULTURES
-#ifndef FEATURE_CORECLR
-FCIMPL1(FC_BOOL_RET, COMNlsInfo::nativeSetThreadLocale, StringObject* localeNameUNSAFE)
-{
- CONTRACTL
- {
- FCALL_CHECK;
- PRECONDITION(CheckPointer(localeNameUNSAFE));
- } CONTRACTL_END;
-
- LCID lcid = 0;
-
- // TODO: NLS Arrowhead -A bit scary becausue Set ThreadLocale can't handle custom cultures?
- STRINGREF localeName = (STRINGREF)localeNameUNSAFE;
- HELPER_METHOD_FRAME_BEGIN_RET_PROTECT(localeName);
- lcid=NewApis::LocaleNameToLCID(localeName->GetBuffer(),0);
- if (lcid == 0)
- {
- ThrowHR(HRESULT_FROM_WIN32(GetLastError()));
- }
- HELPER_METHOD_FRAME_END();
-
-
- BOOL result = TRUE;
-
- // SetThreadLocale doesn't handle names/custom cultures
-#ifdef _MSC_VER
-// Get rid of the SetThreadLocale warning in OACR:
-#pragma warning(push)
-#pragma warning(disable:38010)
-#endif
- result = ::SetThreadLocale(lcid);
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
- FC_RETURN_BOOL(result);
-}
-FCIMPLEND
-#endif
FCIMPL2(Object*, COMNlsInfo::nativeGetLocaleInfoEx, StringObject* localeNameUNSAFE, INT32 lcType)
@@ -1661,18 +1583,6 @@ INT32 QCALLTYPE COMNlsInfo::InternalCompareString(
handle = EnsureValidSortHandle(handle, handleOrigin, localeName);
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- if(!(curDomain->m_bUseOsSorting))
- {
- result = SortVersioning::SortDllCompareString((SortVersioning::PSORTHANDLE) handle, flags, &string1[offset1], length1, &string2[offset2], length2, NULL, 0);
- }
- else if (curDomain->m_pCustomSortLibrary != NULL) {
- result = (curDomain->m_pCustomSortLibrary->pCompareStringEx)(handle != NULL ? NULL : localeName, flags, &string1[offset1], length1, &string2[offset2], length2, NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
result = NewApis::CompareStringEx(handle != NULL ? NULL : localeName, flags, &string1[offset1], length1, &string2[offset2], length2,NULL,NULL, (LPARAM) handle);
}
@@ -1770,40 +1680,19 @@ INT32 QCALLTYPE COMNlsInfo::InternalGetGlobalizedHashCode(INT_PTR handle, INT_PT
COMPlusThrowArgumentNull(W("string"),W("ArgumentNull_String"));
}
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-#endif // FEATURE_CORECLR
if(length > 0 && UseConstantSpaceHashAlgorithm()
// Note that we can't simply do the hash without the entropy and then try to add it after the fact we need the hash function itself to pass entropy to its inputs.
#ifdef FEATURE_RANDOMIZED_STRING_HASHING
&& !bForceRandomizedHashing
-#ifndef FEATURE_CORECLR
- && !curDomain->m_pNlsHashProvider->GetUseRandomHashing()
-#else
&& !COMNlsHashProvider::s_NlsHashProvider.GetUseRandomHashing()
-#endif // FEATURE_CORECLR
#endif // FEATURE_RANDOMIZED_STRING_HASHING
)
{
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- iReturnHash=SortVersioning::SortDllGetHashCode((SortVersioning::PSORTHANDLE) handle, dwFlagsIn, string, length, NULL, 0);
- }
- else
-#endif
{
int iRes = 0;
int iHashValue = 0;
-#ifndef FEATURE_CORECLR
- if (curDomain->m_pCustomSortLibrary != NULL)
- {
- iRes = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(localeName, dwFlagsIn | LCMAP_HASH, string, length, (LPWSTR) &iHashValue, sizeof(INT32), NULL, NULL, 0);
- }
- else
-#endif
{
iRes = NewApis::LCMapStringEx(localeName, dwFlagsIn | LCMAP_HASH, string, length, (LPWSTR) &iHashValue, sizeof(INT32), NULL, NULL, 0);
}
@@ -1824,17 +1713,6 @@ INT32 QCALLTYPE COMNlsInfo::InternalGetGlobalizedHashCode(INT_PTR handle, INT_PT
//
// Assert if we might hit an AV in LCMapStringEx for the invariant culture.
_ASSERTE(length > 0 || (dwFlags & LCMAP_LINGUISTIC_CASING) == 0);
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- byteCount=SortVersioning::SortDllGetSortKey((SortVersioning::PSORTHANDLE) handle, dwFlagsIn, string, length, NULL, 0, NULL, 0);
- }
- else if (curDomain->m_pCustomSortLibrary != NULL)
- {
- byteCount = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : localeName, dwFlags, string, length, NULL, 0, NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
byteCount=NewApis::LCMapStringEx(handle != NULL ? NULL : localeName, dwFlags, string, length, NULL, 0, NULL, NULL, (LPARAM) handle);
}
@@ -1851,26 +1729,11 @@ INT32 QCALLTYPE COMNlsInfo::InternalGetGlobalizedHashCode(INT_PTR handle, INT_PT
CQuickBytesSpecifySize<MAX_STRING_VALUE * sizeof(WCHAR)> qbBuffer;
BYTE* pByte = (BYTE*)qbBuffer.AllocThrows(byteCount);
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- SortVersioning::SortDllGetSortKey((SortVersioning::PSORTHANDLE) handle, dwFlagsIn, string, length, pByte, byteCount, NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : localeName, dwFlags, string, length, (LPWSTR)pByte, byteCount, NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
NewApis::LCMapStringEx(handle != NULL ? NULL : localeName, dwFlags, string, length, (LPWSTR)pByte, byteCount, NULL,NULL, (LPARAM) handle);
}
-#ifndef FEATURE_CORECLR
- iReturnHash = curDomain->m_pNlsHashProvider->HashSortKey(pByte, byteCount, bForceRandomizedHashing, additionalEntropy);
-#else
iReturnHash = COMNlsHashProvider::s_NlsHashProvider.HashSortKey(pByte, byteCount, bForceRandomizedHashing, additionalEntropy);
-#endif // FEATURE_CORECLR
}
}
END_QCALL;
@@ -1910,36 +1773,6 @@ FCIMPL5(FC_CHAR_RET, COMNlsInfo::InternalChangeCaseChar,
handle = EnsureValidSortHandle(handle, handleOrigin, localeName->GetBuffer());
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- //For a versioned sort, Invariant should still use the OS
- if(!(curDomain->m_bUseOsSorting) && !isInvariantLocale)
- {
- ret_LCMapStringEx = SortVersioning::SortDllChangeCase((SortVersioning::PSORTHANDLE) handle,
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
- LCMAP_LOWERCASE | linguisticCasing,
- &wch,
- 1,
- &retVal,
- 1,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- ret_LCMapStringEx = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : localeName->GetBuffer(),
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
- LCMAP_LOWERCASE | linguisticCasing,
- &wch,
- 1,
- &retVal,
- 1,
- NULL,
- NULL,
- (LPARAM) handle);
- }
- else
-#endif
{
ret_LCMapStringEx = NewApis::LCMapStringEx(handle != NULL ? NULL : localeName->GetBuffer(),
bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
@@ -2025,36 +1858,6 @@ FCIMPL5(Object*, COMNlsInfo::InternalChangeCaseString,
LPWSTR pResultStr = gc.pResult->GetBuffer();
int result;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- //Invariant should always use OS
- if(!(curDomain->m_bUseOsSorting) && !isInvariantLocale)
- {
- result = SortVersioning::SortDllChangeCase((SortVersioning::PSORTHANDLE) handle,
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- pResultStr,
- nLengthOutput,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- result = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- pResultStr,
- nLengthOutput,
- NULL,
- NULL,
- (LPARAM) handle);
- }
- else
-#endif
{
result = NewApis::LCMapStringEx(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
@@ -2076,34 +1879,6 @@ FCIMPL5(Object*, COMNlsInfo::InternalChangeCaseString,
ThrowLastError();
}
// need to update buffer
-#ifndef FEATURE_CORECLR
- //Invariant should always use OS
- if(!(curDomain->m_bUseOsSorting) && !IsInvariantLocale(gc.pLocale))
- {
- nLengthOutput = SortVersioning::SortDllChangeCase((SortVersioning::PSORTHANDLE) handle,
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- NULL,
- 0,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- nLengthOutput = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- NULL,
- 0,
- NULL,
- NULL,
- (LPARAM) handle);
- }
- else
-#endif
{
nLengthOutput = NewApis::LCMapStringEx(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
@@ -2133,34 +1908,6 @@ FCIMPL5(Object*, COMNlsInfo::InternalChangeCaseString,
gc.pResult = StringObject::NewString(nLengthOutput);
pResultStr = gc.pResult->GetBuffer();
-#ifndef FEATURE_CORECLR
- //Invariant should always use OS
- if(!(curDomain->m_bUseOsSorting) && !IsInvariantLocale(gc.pLocale))
- {
- result = SortVersioning::SortDllChangeCase((SortVersioning::PSORTHANDLE) handle,
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing:
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- pResultStr,
- nLengthOutput,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- result = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
- bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
- LCMAP_LOWERCASE | linguisticCasing,
- gc.pString->GetBuffer(),
- nLengthInput,
- pResultStr,
- nLengthOutput,
- NULL,
- NULL,
- (LPARAM) handle);
- }
- else
-#endif
{
result = NewApis::LCMapStringEx(handle != NULL ? NULL : (gc.pLocale)->GetBuffer(),
bIsToUpper?LCMAP_UPPERCASE | linguisticCasing :
@@ -2217,9 +1964,6 @@ FCIMPL6(INT32, COMNlsInfo::InternalGetCaseInsHash,
*((LPVOID *)&strA)=pvStrA;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-#endif
//
// If we know that we don't have any high characters (the common case) we can
@@ -2235,11 +1979,7 @@ FCIMPL6(INT32, COMNlsInfo::InternalGetCaseInsHash,
{
// Notice that for Turkish and Azeri we don't get here and shouldn't use this
// fast path because of their special Latin casing rules.
-#ifndef FEATURE_CORECLR
- result = curDomain->m_pNlsHashProvider->HashiStringKnownLower80(strA->GetBuffer(), strA->GetStringLength(), bForceRandomizedHashing, additionalEntropy);
-#else
result = COMNlsHashProvider::s_NlsHashProvider.HashiStringKnownLower80(strA->GetBuffer(), strA->GetStringLength(), bForceRandomizedHashing, additionalEntropy);
-#endif // FEATURE_CORECLR
}
else
{
@@ -2259,29 +1999,6 @@ FCIMPL6(INT32, COMNlsInfo::InternalGetCaseInsHash,
}
int lcmapResult;
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- lcmapResult = SortVersioning::SortDllChangeCase((SortVersioning::PSORTHANDLE) handle,
- LCMAP_UPPERCASE | linguisticCasing,
- strA->GetBuffer(),
- length,
- pNewStr,
- length,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- lcmapResult = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : localeName->GetBuffer(),
- LCMAP_UPPERCASE | linguisticCasing,
- strA->GetBuffer(),
- length,
- pNewStr,
- length,
- NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
lcmapResult = NewApis::LCMapStringEx(handle != NULL ? NULL : localeName->GetBuffer(),
LCMAP_UPPERCASE | linguisticCasing,
@@ -2302,11 +2019,7 @@ FCIMPL6(INT32, COMNlsInfo::InternalGetCaseInsHash,
// Get hash for the upper case of the new string
-#ifndef FEATURE_CORECLR
- result = curDomain->m_pNlsHashProvider->HashString(pNewStr, length, (BOOL)bForceRandomizedHashing, additionalEntropy);
-#else
result = COMNlsHashProvider::s_NlsHashProvider.HashString(pNewStr, length, (BOOL)bForceRandomizedHashing, additionalEntropy);
-#endif // FEATURE_CORECLR
}
END_SO_INTOLERANT_CODE
@@ -2351,23 +2064,6 @@ BOOL QCALLTYPE COMNlsInfo::InternalTryFindStringOrdinalIgnoreCase(
else {
lpSearchStart = &lpStringSource[sourceIndex];
}
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- // Check if the default sorting is overridden
- if (curDomain->m_pCustomSortLibrary != NULL)
- {
- *foundIndex = (curDomain->m_pCustomSortLibrary->pFindStringOrdinal)(
- dwFindNLSStringFlags,
- lpSearchStart,
- cchSource,
- lpStringValue,
- cchValue,
- TRUE);
- result = TRUE;
- }
- else
-#endif
{
{
*foundIndex = FindStringOrdinal(
@@ -2423,14 +2119,6 @@ INT32 QCALLTYPE COMNlsInfo::InternalCompareStringOrdinalIgnoreCase(
_ASSERT(length2 >= 0);
// Do the comparison
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- if (curDomain->m_pCustomSortLibrary != NULL) {
- result = (curDomain->m_pCustomSortLibrary->pCompareStringOrdinal)(string1 + index1, length1, string2 + index2, length2, TRUE);
- }
- else
-#endif
{
result = NewApis::CompareStringOrdinal(string1 + index1, length1, string2 + index2, length2, TRUE);
}
@@ -2581,15 +2269,6 @@ void QCALLTYPE COMNlsInfo::nativeNormalizationInitNormalization(int NormForm, BY
if (!hNormalization)
ThrowLastError();
}
-#ifndef FEATURE_CORECLR
- // in coreclr we should always find the normalization in kernel32 as it supports Win7 and up
- else
- {
- HRESULT hr = g_pCLRRuntime->LoadLibrary(NORMALIZATION_DLL, &hNormalization);
- if (FAILED(hr))
- ThrowHR(hr);
- }
-#endif // FEATURE_CORECLR
_ASSERTE(hNormalization != NULL);
m_hNormalization = hNormalization;
@@ -2771,7 +2450,6 @@ FCIMPL1(FC_BOOL_RET, COMNlsInfo::nativeInitCultureData, CultureDataBaseObject *c
gc.stringResult = StringObject::NewString(buffer, result - 1);
SetObjectReference((OBJECTREF*)&(gc.cultureData->sSpecificCulture), gc.stringResult, NULL);
-#ifdef FEATURE_CORECLR
if (!IsWindows7())
{
// For neutrals on Windows 7 + the neutral windows name can be the same as the neutral name,
@@ -2779,7 +2457,6 @@ FCIMPL1(FC_BOOL_RET, COMNlsInfo::nativeInitCultureData, CultureDataBaseObject *c
gc.stringResult = StringObject::NewString(buffer, result - 1);
SetObjectReference((OBJECTREF*)&(gc.cultureData->sWindowsName), gc.stringResult, NULL);
}
-#endif
}
@@ -2819,12 +2496,10 @@ FCIMPL1(FC_BOOL_RET, COMNlsInfo::nativeInitCultureData, CultureDataBaseObject *c
SetObjectReference((OBJECTREF*)&(gc.cultureData->sName), gc.stringResult, NULL);
}
-#ifdef FEATURE_CORECLR
// For Silverlight make sure that the sorting tables are available (< Vista may not have east asian installed)
result = NewApis::CompareStringEx(((STRINGREF)gc.cultureData->sWindowsName)->GetBuffer(),
0, W("A"), 1, W("B"), 1, NULL, NULL, 0);
if (result == 0) goto Exit;
-#endif
// It succeeded.
success = TRUE;
@@ -2887,16 +2562,9 @@ int QCALLTYPE COMNlsInfo::InternalFindNLSStringEx(
BEGIN_QCALL;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
- handle = EnsureValidSortHandle(handle, handleOrigin, lpLocaleName);
-#endif
#define RESERVED_FIND_ASCII_STRING 0x20000000 // This flag used only to tell the sorting DLL can assume the string characters are in ASCII.
-#ifndef FEATURE_CORECLR
- int asciiFlag = (dwFindNLSStringFlags & RESERVED_FIND_ASCII_STRING);
-#endif // FEATURE_CORECLR
dwFindNLSStringFlags &= ~RESERVED_FIND_ASCII_STRING;
@@ -2950,29 +2618,6 @@ int QCALLTYPE COMNlsInfo::InternalFindNLSStringEx(
{
if (dwFindNLSStringFlags & (FIND_FROMEND | FIND_ENDSWITH))
{
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- retValue = SortVersioning::SortDllFindString((SortVersioning::PSORTHANDLE) handle,
- dwFindNLSStringFlags | asciiFlag,
- &lpStringSource[sourceIndex - cchSource + 1],
- cchSource,
- lpStringValue,
- cchValue,
- NULL, NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- retValue = (curDomain->m_pCustomSortLibrary->pFindNLSStringEx)(
- handle != NULL ? NULL : lpLocaleName,
- dwFindNLSStringFlags,
- &lpStringSource[sourceIndex - cchSource + 1],
- cchSource,
- lpStringValue,
- cchValue, NULL, NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
retValue = NewApis::FindNLSStringEx(
handle != NULL ? NULL : lpLocaleName,
@@ -2990,29 +2635,6 @@ int QCALLTYPE COMNlsInfo::InternalFindNLSStringEx(
}
else
{
-#ifndef FEATURE_CORECLR
- if(!(curDomain->m_bUseOsSorting))
- {
- retValue = SortVersioning::SortDllFindString((SortVersioning::PSORTHANDLE) handle,
- dwFindNLSStringFlags | asciiFlag,
- &lpStringSource[sourceIndex],
- cchSource,
- lpStringValue,
- cchValue,
- NULL, NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- retValue = (curDomain->m_pCustomSortLibrary->pFindNLSStringEx)(
- handle != NULL ? NULL : lpLocaleName,
- dwFindNLSStringFlags,
- &lpStringSource[sourceIndex],
- cchSource,
- lpStringValue,
- cchValue, NULL, NULL, NULL, (LPARAM) handle);
- }
- else
-#endif
{
retValue = NewApis::FindNLSStringEx(
handle != NULL ? NULL : lpLocaleName,
@@ -3062,35 +2684,6 @@ int QCALLTYPE COMNlsInfo::InternalGetSortKey(
BEGIN_QCALL;
-#ifndef FEATURE_CORECLR
- handle = EnsureValidSortHandle(handle, handleOrigin, pLocaleName);
-
- AppDomain* curDomain = GetAppDomain();
-
- if(!(curDomain->m_bUseOsSorting))
- {
- retValue = SortVersioning::SortDllGetSortKey((SortVersioning::PSORTHANDLE) handle,
- flags,
- pStringSource,
- cchSource,
- pTarget,
- cchTarget,
- NULL, 0);
- }
- else if(curDomain->m_pCustomSortLibrary != NULL)
- {
- retValue = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(handle != NULL ? NULL : pLocaleName,
- flags | LCMAP_SORTKEY,
- pStringSource,
- cchSource,
- (LPWSTR)pTarget,
- cchTarget,
- NULL,
- NULL,
- (LPARAM) handle);
- }
- else
-#endif
{
// Just call NewApis::LCMapStringEx to do our work
retValue = NewApis::LCMapStringEx(handle != NULL ? NULL : pLocaleName,
@@ -3143,86 +2736,11 @@ INT_PTR COMNlsInfo::InitSortHandleHelper(LPCWSTR localeName, __out INT_PTR* hand
INT_PTR pSort = NULL;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
-#if _DEBUG
- _ASSERTE(curDomain->m_bSortingInitialized);
-#endif
-
- if(curDomain->m_bUseOsSorting)
- {
- pSort = InternalInitOsSortHandle(localeName, handleOrigin);
- }
- else
- {
- pSort = InternalInitVersionedSortHandle(localeName, handleOrigin);
- }
-#else
// coreclr will try to initialize the handle and if running on downlevel it'll just return null
pSort = InternalInitOsSortHandle(localeName, handleOrigin);
-#endif // FEATURE_CORECLR
return pSort;
}
-#ifndef FEATURE_CORECLR
-INT_PTR COMNlsInfo::InternalInitVersionedSortHandle(LPCWSTR localeName, __out INT_PTR* handleOrigin)
-{
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- CANNOT_TAKE_LOCK;
- PRECONDITION(localeName != NULL);
- } CONTRACTL_END;
-
- AppDomain* curDomain = GetAppDomain();
-
- if(curDomain->m_pCustomSortLibrary != NULL)
- {
- return NULL;
- }
-
- return InternalInitVersionedSortHandle(localeName, handleOrigin, curDomain->m_sortVersion);
-}
-
-INT_PTR COMNlsInfo::InternalInitVersionedSortHandle(LPCWSTR localeName, __out INT_PTR* handleOrigin, DWORD sortVersion)
-{
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- CANNOT_TAKE_LOCK;
- PRECONDITION(localeName != NULL);
- } CONTRACTL_END;
-
- INT_PTR pSort = NULL;
-
- _ASSERTE(NewApis::NotLeakingFrameworkOnlyCultures(localeName));
-
- *handleOrigin = (INT_PTR) SortVersioning::GetSortHandle;
-
- // try the requested version
- if(sortVersion != DEFAULT_SORT_VERSION)
- {
- NLSVERSIONINFO sortVersionInfo;
- sortVersionInfo.dwNLSVersionInfoSize = sizeof(NLSVERSIONINFO);
- sortVersionInfo.dwNLSVersion = sortVersion;
- sortVersionInfo.dwDefinedVersion = sortVersion;
- pSort = (INT_PTR) SortVersioning::GetSortHandle(localeName, &sortVersionInfo);
- }
-
- // fallback to default version
- if(pSort == NULL)
- {
- pSort = (INT_PTR) SortVersioning::GetSortHandle(localeName, NULL);
- }
-
- _ASSERTE(RunningOnWin8() || pSort != NULL);
-
- return pSort;
-}
-#endif //FEATURE_CORECLR
// Can return NULL
INT_PTR COMNlsInfo::InternalInitOsSortHandle(LPCWSTR localeName, __out INT_PTR* handleOrigin)
@@ -3239,23 +2757,11 @@ INT_PTR COMNlsInfo::InternalInitOsSortHandle(LPCWSTR localeName, __out INT_PTR*
AppDomain* curDomain = GetAppDomain();
-#ifndef FEATURE_CORECLR
- if (RunningOnWin8() || curDomain->m_pCustomSortLibrary != NULL)
-#else
if (RunningOnWin8())
-#endif //FEATURE_CORECLR
{
LPARAM lSortHandle;
int ret;
-#ifndef FEATURE_CORECLR
- if (curDomain->m_pCustomSortLibrary != NULL)
- {
- ret = (curDomain->m_pCustomSortLibrary->pLCMapStringEx)(localeName, LCMAP_SORTHANDLE, NULL, 0, (LPWSTR) &lSortHandle, sizeof(LPARAM), NULL, NULL, 0);
- *handleOrigin = (INT_PTR) curDomain->m_pCustomSortLibrary->pLCMapStringEx;
- }
- else
-#endif //FEATURE_CORECLR
{
ret = NewApis::LCMapStringEx(localeName, LCMAP_SORTHANDLE, NULL, 0, (LPWSTR) &lSortHandle, sizeof(LPARAM), NULL, NULL, 0);
*handleOrigin = (INT_PTR) NewApis::LCMapStringEx;
@@ -3279,59 +2785,9 @@ BOOL QCALLTYPE COMNlsInfo::InternalGetNlsVersionEx(INT_PTR handle, INT_PTR handl
BOOL ret = FALSE;
BEGIN_QCALL;
-#ifndef FEATURE_CORECLR
- AppDomain* curDomain = GetAppDomain();
-
- if(curDomain->m_bUseOsSorting)
- {
- if(curDomain->m_pCustomSortLibrary != NULL)
- {
- ret = (curDomain->m_pCustomSortLibrary->pGetNLSVersionEx)(COMPARE_STRING, lpLocaleName, lpVersionInformation);
- }
- else
- {
- ret = GetNLSVersionEx(COMPARE_STRING, lpLocaleName, lpVersionInformation);
- }
- }
- else
- {
- handle = EnsureValidSortHandle(handle, handleOrigin, lpLocaleName);
-
- NLSVERSIONINFO nlsVersion;
- nlsVersion.dwNLSVersionInfoSize = sizeof(NLSVERSIONINFO);
-
- ret = SortVersioning::SortGetNLSVersion((SortVersioning::PSORTHANDLE) handle, COMPARE_STRING, &nlsVersion);
-
- lpVersionInformation->dwNLSVersion = nlsVersion.dwNLSVersion;
- lpVersionInformation->dwDefinedVersion = nlsVersion.dwDefinedVersion;
- lpVersionInformation->dwEffectiveId = 0;
- ZeroMemory(&(lpVersionInformation->guidCustomVersion), sizeof(GUID));
- }
-#else
ret = GetNLSVersionEx(COMPARE_STRING, lpLocaleName, lpVersionInformation);
-#endif // FEATURE_CORECLR
END_QCALL;
return ret;
}
-#ifndef FEATURE_CORECLR
-DWORD QCALLTYPE COMNlsInfo::InternalGetSortVersion()
-{
- CONTRACTL {
- QCALL_CHECK;
- } CONTRACTL_END;
-
- DWORD version = DEFAULT_SORT_VERSION;
-
- BEGIN_QCALL;
-
- AppDomain* curDomain = GetAppDomain();
- version = curDomain->m_sortVersion;
-
- END_QCALL;
-
- return version;
-}
-
-#endif //FEATURE_CORECLR