summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2015-03-30 06:28:55 -0700
committerStephen Toub <stoub@microsoft.com>2015-03-30 06:28:55 -0700
commitce2ebf00d95a1f9e57909a3ad2119ee4ab18773f (patch)
treefc6e5f7f44b83aea7a0b783be8efc67335d7c1c9
parentf630092301c53fc88419900039e9fd6fc94be9d0 (diff)
downloadcoreclr-ce2ebf00d95a1f9e57909a3ad2119ee4ab18773f.tar.gz
coreclr-ce2ebf00d95a1f9e57909a3ad2119ee4ab18773f.tar.bz2
coreclr-ce2ebf00d95a1f9e57909a3ad2119ee4ab18773f.zip
Copy all of invariant culture's data in stubbed out globalization
We've been piecemeal copying parts of the invariant culture over to our temporary culture implementation. But as I've hit additional pieces needed, I decided to just copy over everything so that hopefully we don't bump up against this again.
-rw-r--r--src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs88
1 files changed, 77 insertions, 11 deletions
diff --git a/src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs b/src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs
index ef84a1cfc7..5a42ab2e0c 100644
--- a/src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs
+++ b/src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs
@@ -43,17 +43,83 @@ namespace System.Globalization
private unsafe bool InitCultureData()
{
// TODO: Implement this fully.
- sWindowsName = "";
- sRealName = "";
- sSpecificCulture = "";
- sName = "";
- bNeutral = false;
- sNegativeSign = "-";
- sThousandSeparator = ",";
- sDecimalSeparator = ".";
- sCurrency = "\u00A4";
- sMonetaryDecimal = ".";
- sMonetaryThousand = ",";
+
+ // For now, just use all of the Invariant's data
+ CultureData invariant = CultureData.Invariant;
+
+ this.sRealName = invariant.sRealName;
+ this.sWindowsName = invariant.sWindowsName;
+
+ // Identity
+ this.sName = invariant.sName;
+ this.sParent = invariant.sParent;
+ this.bNeutral = invariant.bNeutral;
+ this.sEnglishDisplayName = invariant.sEnglishDisplayName;
+ this.sNativeDisplayName = invariant.sNativeDisplayName;
+ this.sSpecificCulture = invariant.sSpecificCulture;
+
+ // Language
+ this.sISO639Language = invariant.sISO639Language;
+ this.sLocalizedLanguage = invariant.sLocalizedLanguage;
+ this.sEnglishLanguage = invariant.sEnglishLanguage;
+ this.sNativeLanguage = invariant.sNativeLanguage;
+
+ // Region
+ this.sRegionName = invariant.sRegionName;
+ this.sEnglishCountry = invariant.sEnglishCountry;
+ this.sNativeCountry = invariant.sNativeCountry;
+ this.sISO3166CountryName = invariant.sISO3166CountryName;
+
+ // Numbers
+ this.sPositiveSign = invariant.sPositiveSign;
+ this.sNegativeSign = invariant.sNegativeSign;
+ this.saNativeDigits = invariant.saNativeDigits;
+ this.iDigits = invariant.iDigits;
+ this.iNegativeNumber = invariant.iNegativeNumber;
+ this.waGrouping = invariant.waGrouping;
+ this.sDecimalSeparator = invariant.sDecimalSeparator;
+ this.sThousandSeparator = invariant.sThousandSeparator;
+ this.sNaN = invariant.sNaN;
+ this.sPositiveInfinity = invariant.sPositiveInfinity;
+ this.sNegativeInfinity = invariant.sNegativeInfinity;
+
+ // Percent
+ this.iNegativePercent = invariant.iNegativePercent;
+ this.iPositivePercent = invariant.iPositivePercent;
+ this.sPercent = invariant.sPercent;
+ this.sPerMille = invariant.sPerMille;
+
+ // Currency
+ this.sCurrency = invariant.sCurrency;
+ this.sIntlMonetarySymbol = invariant.sIntlMonetarySymbol;
+ this.iCurrencyDigits = invariant.iCurrencyDigits;
+ this.iCurrency = invariant.iCurrency;
+ this.iNegativeCurrency = invariant.iNegativeCurrency;
+ this.waMonetaryGrouping = invariant.waMonetaryGrouping;
+ this.sMonetaryDecimal = invariant.sMonetaryDecimal;
+ this.sMonetaryThousand = invariant.sMonetaryThousand;
+
+ // Misc
+ this.iMeasure = invariant.iMeasure;
+ this.sListSeparator = invariant.sListSeparator;
+
+ // Time
+ this.sAM1159 = invariant.sAM1159;
+ this.sPM2359 = invariant.sPM2359;
+ this.saLongTimes = invariant.saLongTimes;
+ this.saShortTimes = invariant.saShortTimes;
+ this.saDurationFormats = invariant.saDurationFormats;
+
+ // Calendar specific data
+ this.iFirstDayOfWeek = invariant.iFirstDayOfWeek;
+ this.iFirstWeekOfYear = invariant.iFirstWeekOfYear;
+ this.waCalendars = invariant.waCalendars;
+
+ // Store for specific data about each calendar
+ this.calendars = invariant.calendars;
+
+ // Text information
+ this.iReadingLayout = invariant.iReadingLayout;
return true;
}