Skip to content

Platform notes

These notes describe runtime support and limitations.

C# limitations

C# wraps ICU4C via P/Invoke and bundles ICU 72 native binaries. The following methods are unavailable:

  • IndexBuckets() — AlphabeticIndex has no C API (C++ only).
  • BestMatch() / negotiating FromAcceptLanguage() — LocaleMatcher has no C API. The non-negotiating FromAcceptLanguage(header) (no supported list) works.
  • PersonName() — PersonNameFormatter was added in ICU 73 C++; the bundled ICU is version 72.
  • SupportedValues("unit") — uloc_getAvailable doesn't enumerate CLDR measure units; throws CosmoUnsupportedException.
  • Get() — the wrapper does not expose raw ResourceBundle access.

Supported features include RBNF (spellout/ordinal), CLDR delimiters (quote), transliteration, spoof detection, locale-aware parsing, likely-subtags, FormatMoment, DateRange (all widths), relative-duration word forms, weekend days in WeekInfo, and most SupportedValues keys.

Locale data

Cosmo reads locale data from ICU instead of maintaining hardcoded tables. Data updates follow the runtime or bundled ICU version. Updating Cosmo alone does not necessarily update locale data.