throw new NotImplementedException ();
}
- var territories = entry.Attributes["territories"].Value.Split ();
+ var territories = entry.Attributes["territories"].Value.Split (new [] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var t in territories) {
- territory2dayofweek.Add (t, dow);
+ var tr = t.Trim ();
+ if (tr.Length == 0)
+ continue;
+
+ territory2dayofweek.Add (tr, dow);
}
}
break;
}
}
-
- if (nfe.CurrencyDecimalDigits == null) {
- var all_digits = new List<string> ();
- GetAllChildrenValues (ci, all_digits, l => l.NumberFormatEntry.CurrencyDecimalDigits);
- var children = all_digits.Where (l => l != null).Distinct ().ToList ();
-
- if (children.Count == 1) {
- nfe.CurrencyDecimalDigits = children[0];
- } else if (children.Count == 0) {
- if (!ci.HasMissingLocale)
- Console.WriteLine ("No currency decimal digits data for `{0}'", ci.Name);
-
- nfe.CurrencyDecimalDigits = "2";
- } else if (ci.IsNeutral) {
- nfe.CurrencyDecimalDigits = "2";
- } else {
- // .NET has weird concept of territory data available for neutral cultures (e.g. en, es, pt)
- // We have to manually disambiguate the correct entry (which is artofficial anyway)
- throw new ApplicationException (string.Format ("Ambiguous currency decimal digits data for `{0}'", ci.Name));
- }
- }
}
if (OutputCompare)
ni.PercentSymbol = el.InnerText;
}
-
- string value = null;
-
- // .net has incorrect separators for some countries and we want to be compatible
- switch (ci.Name) {
- case "es-ES":
- case "es":
- // es-ES does not have group separator but .net has '.'
- value = ".";
- break;
- default:
- if (node != null) {
- el = node.SelectSingleNode ("group");
- if (el != null) {
- value = el.InnerText;
- }
- }
-
- break;
- }
-
- if (value != null) {
- ni.NumberGroupSeparator = ni.CurrencyGroupSeparator = value;
- }
}
static void ToLower (string[] values)