Repository navigation
DataStandardizer.LanguageTag 2.0.1
·
1 commit
to develop
since this release
Breaking changes:
- Casting a string to Bcp47KeyedSubtag throws InvalidCastException unless it is one extension or one private use sequence.
- Loading a
SubtagRegistrythrowsFormatException, naming the record's line, for aPrefixthat isn't a well-formed language tag or that repeats a variant subtag or extension singleton, aSuppress-Scriptthat isn't a script subtag, aMacrolanguagethat isn't a primary language subtag, aPreferred-Valuenot in the form RFC 5646 §3.1.2 gives it for the record'sType, anextlangrecord whosePreferred-Valueis missing or not identical to itsSubtag, and an emptySuppress-Script,MacrolanguageorPreferred-Value(RFC 5646 §2.2.2, §2.2.9, §3.1.2, §3.1.7 to §3.1.10). Before, such a registry loaded. Bcp47KeyedSubtag.Singletonreturnscharinstead ofchar?; code that reads.Valueor.HasValue, or applies??to it, uses the property directly.
Fixed:
- A reused
Bcp47LanguageTagBuilderno longer returns the earlier tag, or mixes the earlier tag's subtags into the new one.UsingLanguageTagandUsingPrimaryLanguageSubtageach start a new tag; the Subtag Registry or conformance chosen stays. - Loading a
SubtagRegistrythrowsFormatException, naming the line, for aPrefixfield outside anextlangorvariantrecord, anextlangrecord without exactly one, an emptyPrefixorScope, aSuppress-Script,MacrolanguageorScopefield outside alanguageorextlangrecord, aScopeother thanmacrolanguage,collection,specialandprivate-use, aSubtagthat isn't a subtag of its record'sTypein the case RFC 5646 §3.1.4 gives it, aTagnot formatted as §2.1.1 describes, or a character outside printable US-ASCII in a field RFC 5646 defines, other thanDescriptionandComments(RFC 5646 §3.1.1, §3.1.2, §3.1.4, §3.1.8). Before, such a registry loaded and its records showed up throughLanguages,Regions,TryGetSubtagand the other members. - Bcp47LanguageTag.Create with LanguageTagConformance.IsoCodeLists reports a repeated variant subtag or extension singleton with its own message, instead of blaming well-formedness or the ISO code lists.
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
- Parsing a language tag, and
Bcp47LanguageTagBuilder.UsingVariantSubtags, check a long list of variant subtags for repeats faster.