Repository navigation
Releases
Releases · matthew25187/DataStandardizer
DataStandardizer.Money 2.0.2
Fixed:
- CodeAttributeBase.EnglishNames and FrenchNames return a copy, so changing the returned array no longer changes the attribute's names.
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
DataStandardizer.File.vCard 2.0.2
Breaking changes:
- Writing a vCard 3.0 or 2.1 card keeps a backslash followed by "n" in an ADR LABEL parameter as those two characters instead of writing a line break; only "^n" is a line break (RFC 6868).
- VcardValue.TryParseUri and the typed URI members of a card give no Uri for a URI whose scheme is one letter, such as c:/dir/file, on every runtime, instead of a file URI on Windows; the card keeps the value as written.
- VcardValue.TryFormatUri and the vCard values made from a Uri throw ArgumentException for a Uri made from a drive path, such as C:/dir/file, whose text would be read back as a URI with the scheme "C".
- Writing a vCard 2.1 card now refuses a value or parameter that isn't valid in a card held by an
AGENT, as it does in the card itself, unlessAllowInvalidValuesis set. - VcardReader throws VcardFileException (InvalidValue) for a vCard 2.1 QUOTED-PRINTABLE value on a line of 76 characters or more, which vCard 2.1 §2.1.3 doesn't allow; AllowInvalidValues accepts it.
Fixed:
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
- Reading a vCard 3.0 or 2.1 card keeps a value that vCard 4.0 has no form for, instead of throwing InvalidOperationException.
- Reading a vCard 2.1 or 3.0 AGENT whose card keeps a line in its own form no longer fails.
- Writing a vCard 3.0 card reports the sort key of an ORG as lost when the card has an N, instead of moving it to the name.
- Writing a vCard 3.0 card splits a quoted TYPE list into separate types instead of writing it as one type.
- Writing a vCard 2.1 card no longer writes AGENT cards nested deeper than a reader accepts.
- Reading a vCard 3.0 time keeps every digit of its fraction of a second instead of only the first 18.
- VcardDate.TryParse gives the default date when it rejects an xCard year alone.
VcardValue.TryParseFloatgives 0, not infinity, when it rejects a number beyond the range ofdouble.- The vCard 3.0 and 2.1 views show a REV, BDAY or TZ value that vCard 4.0 has no form for.
- IVcard30Card.Labels and IVcard21Card.Labels give a backslash followed by "n" in an ADR LABEL parameter unchanged instead of as a line break.
- VCard FLOAT and EMLX real values are read as the same double on .NET Framework as on .NET 10, including negative zero.
- Writing a vCard 2.1 card under
AllowInvalidValuesno longer throws for a keptQUOTED-PRINTABLEvalue that can't be decoded; it is written as it is. - Writing a vCard 3.0 card with no N keeps the sort key of each ORG, as a SORT-STRING after it.
- Reading a vCard 3.0 card with an N keeps a second SORT-STRING as a property of its own, instead of giving it to an ORG.
- IVcard30Card.SortString gives only the sort string a vCard 3.0 writer writes, from the first N or, with no N, the first ORG.
- On .NET Framework, XcardWriter and XcalWriter no longer report an asynchronous write as written when their stream or text writer cancels it.
DataStandardizer.File.iCal 2.0.2
Fixed:
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
- On .NET Framework, XcardWriter and XcalWriter no longer report an asynchronous write as written when their stream or text writer cancels it.
DataStandardizer.File.InternetMessage 2.0.2
Breaking changes:
MboxWriterno longer reports a message that can't be read back with its options asLongBodyLine; the reader's error is thrown with its own kind, position and entity path.ImfReader,ImfEntityReader,MboxReader,EmlxReaderandMhtmlReaderreject a line in a multipart entity that starts with its boundary and is not a delimiter, including the delimiters of a nested multipart entity whose boundary starts with the outer one, asImfWriteralready does (RFC 2046 §5.1.1).- A parameter given both as
nameand in an RFC 2231 form such asname*is now rejected as a duplicate (RFC 6838 §4.3), where the RFC 2231 value used to be kept. - Writers throw an ImfFileException for a multipart entity that was read with no close delimiter and hasn't changed, unless their options set AllowMissingBoundaryTerminator; ImfMessage.Validate reports it as InvalidBodyStructure.
ImfEntity.GetTextthrowsImfFileExceptionfor atext/html,text/xml,text/xml-external-parsed-entityortext/markdownentity with nocharsetparameter, instead of decoding it as US-ASCII. These types have no default character set (RFC 6657 §3), so readGetContentand find it as the format says.ImfEntity.GetTextthrowsImfFileExceptionfor atextentity with the+xmlsuffix, such astext/foo+xml, and nocharsetparameter, instead of decoding it as US-ASCII. These types have no default character set (RFC 7303 §4.2), so readGetContentand find it as XML says.
Fixed:
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
- VCard FLOAT and EMLX real values are read as the same double on .NET Framework as on .NET 10, including negative zero.
EmlxWriter,MboxWriter, andImfWriterwriting a message from an mbox file no longer alter the bytes of a body they would have labelledbinaryunderAllowBinaryTransferEncoding; such a body is now encoded instead.ImfWriter,MboxWriterandEmlxWriterwriting a message that holds a message read from a file with other line breaks, such as one from an mbox or EMLX file being forwarded, now change its line breaks to those of the output, instead of refusing it or writing bare LF line breaks into a CRLF message.ImfWriter,MboxWriter,EmlxWriter,ImfEntityWriterandImfHeaderWriternow write a header field read from a file with other line breaks, such as one from an mbox file added to a message read from an.emlfile, with the line breaks of the message, instead of writing bare LF line breaks into a CRLF message.- RFC 6533 message/global-headers, -delivery-status and -disposition-notification entities may be quoted-printable or base64.
- A new UTF-8 header field no longer makes ImfMessage.Body, Validate or a Utf8 writer fail.
- MboxReader no longer adds a stray line feed to the start of a message read after skipping part of a CRLF message.
- ImfWriter adds MIME-Version to a message after a part of a multipart read without it changes.
- MboxReader applies the line-length limit to quoted From lines correctly after 8-bit and CRLF lines.
- MboxReader counts a carriage return that ends the file as part of a quoted From line.
- Header text decoding (
ImfHeaderText) decodes "Q"-encoded words with lower-case hexadecimal digits, such as=?UTF-8?Q?=c3=a9?=, by default, which RFC 2047 §4.2 allows; before, they were decoded only withImfOptions.AllowMalformedEncodedWords. - Quoted parameter values accept the US-ASCII control characters that RFC 822 allows, as text or as quoted-pairs, instead of rejecting them.
- Content-Type and Content-Disposition fields accept a quoted-pair whose backslash ends a folded line, such as
filename="a\<CRLF> b", and read it as the space after the fold (RFC 5322 §2.2.3); before, the field was rejected. - EmlxPlistValue.TryGetDouble gives the nearest double for a hexadecimal integer too large for a long.
EmlxWriter,MboxWriter,MhtmlWriter, andImfWriterwriting a message from an mbox file no longer alter the CR and LF octets of a body that isn't text and that they would have labelled7bitor8bit; such a body is now encoded instead, and one that asks for7bitor8bitis refused.- Writers refuse a moved part or separately read message whose kept bytes hold a delimiter of a boundary around it.
- A refusal of an entity inside a held message with other line breaks, such as one read from an mbox file, gives the
EntityPathof that entity within the message being written, not within the held message. - The refusal of a
binaryentity, or one with an extension mechanism, whose line breaks would change gives itsEntityPath.
Changed:
- A
text/*body from a forward-only stream, written as quoted-printable, has its bare LFs encoded as=0Ainstead of written as CRLF line breaks, so the content is kept as it is (RFC 2045 §6.7 rule 4).
DataStandardizer.File.CSV 2.0.2
Fixed:
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
- CsvFileWriter constructors name the argument at fault for a read-only stream or an options encoding with a text writer.
DataStandardizer.LanguageTag 2.0.1
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.
DataStandardizer.Language 2.0.1
Breaking changes:
- Casting a null string to an ISO 639 language struct throws InvalidCastException.
- Casting a string that isn't an ISO 639 code to an ISO 639 language struct throws InvalidCastException.
Iso15924Extensions.GetDateandIso15924ScriptCodeAttribute.DatereturnDateTime?on every target, includingnet10.0, where they returnedDateOnly?. A .NET Standard library that calls them no longer fails withMissingMethodExceptionin anet10.0app. On .NET 6 and later, useDateOnly.FromDateTimeto get aDateOnly.IStringEnumno longer extendsIConvertibleon any target. A struct that implementsIConvertibledeclares it itself; the ISO 639 structs still do onnetstandard2.0andnet10.0. Code that uses anIStringEnumas anIConvertibleneeds a cast.
Fixed:
- CodeAttributeBase.EnglishNames and FrenchNames return a copy, so changing the returned array no longer changes the attribute's names.
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
Deprecated and removed:
Iso639LanguageType.Ancientis obsolete. ISO 639:2023 merged the ancient language type intoHistorical, and no ISO 639-3 code has it.
Changed:
- On .NET Standard, the name parameters of every
Iso639LanguageCodeAttributeconstructor are annotated[DisallowNull]. - The package's NuGet tags include
ISO 15924andscript.
DataStandardizer.Geography 2.0.1
Breaking changes:
UnM49AreaCodeAttribute.EnglishNamesandFrenchNameshold only the area's own name instead of one entry per level, andIso3166CountryCodeAttribute.EnglishNamesholds only the English short name instead of the short, upper-case short and full names.- Casting a string to Iso3166Part2Subdivision throws InvalidCastException for a code that isn't in ISO 3166-2.
Fixed:
GetNativeNameon MM and BY (MMR and BLR) returns the current name instead of the former one ("Burma", "Byelorussian SSR"), and the ISO 3166-1 enums no longer carry the former names and language rows of Burma, the Byelorussian SSR, Upper Volta, Zaire and East Timor on MM, BY, BF, CD and TL.UnM49AreaCodeAttribute.EnglishNameandFrenchNameare the area's own name (such as "Afghanistan") instead of "World" and "Monde", andIso3166CountryCodeAttribute.FrenchNameis the country's ISO 3166-1 French short name (such as "France (la)") instead of null.- Iso3166Part2Enum.GetNames and GetValues return a country's subdivisions sorted by code.
- Geography name lookups accept a null language code without a nullable warning, as documented.
- CodeAttributeBase.EnglishNames and FrenchNames return a copy, so changing the returned array no longer changes the attribute's names.
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
DataStandardizer.Core 2.0.1
Breaking changes:
IStringEnumno longer extendsIConvertibleon any target. A struct that implementsIConvertibledeclares it itself; the ISO 639 structs still do onnetstandard2.0andnet10.0. Code that uses anIStringEnumas anIConvertibleneeds a cast.
Fixed:
- CodeAttributeBase.EnglishNames and FrenchNames return a copy, so changing the returned array no longer changes the attribute's names.
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
DataStandardizer.Communication 2.0.1
Breaking changes:
- A parameter given both as
nameand in an RFC 2231 form such asname*is now rejected as a duplicate (RFC 6838 §4.3), where the RFC 2231 value used to be kept. MimeParameter.EqualsandGetHashCodecompare the character set of such a value, so the same octets in different character sets are no longer equal.- An encoded word in a character set that switches modes, such as ISO-2022-JP, is accepted only if it switches back to ASCII by its end (RFC 2047 §3), on every target and with every option.
- In
MimeQuotedPrintableMode.Body, the quoted-printable decoder rejects an encoded line longer than 76 characters, not counting its transport padding and CRLF (RFC 2045 §6.7 rule 5). - The quoted-printable encoder writes a bare LF in text as
=0A, not as a CRLF line break, so the encoded data decodes to the original octets (RFC 2045 §6.7 rule 4). - In a comment (
MimeEncodedWordContext.Comment,MimeQuotedPrintableMode.EncodedWordComment), "Q"-encoded text containing a literal\is now rejected, as RFC 2047 §5(2) erratum 504 requires. MimeCharsetResolverno longer resolves charset names that aren't registered with IANA, such asascii,ucs-2,unicodeandunicodeFFFE; pass a resolver for them to theMimeCharsetResolverconstructor to accept them.- A Content-Transfer-Encoding mechanism that is neither one of the five RFC 2045 defines nor an x- token, such as uuencode or x-, is rejected as RFC 2045 §6.1 requires: MimeTransferEncoding.Parse and TryParse fail, and readers that parse the field report it as invalid.
- MimeEncodedWord.TryParse with AllowLongWords rejects a word over 75 characters that can't be written back within the limit: one with empty text, a language over 61 characters, or a character set the resolver doesn't resolve.
ItuE164InternationalNumber.ParseandTryParsereject a number with any character between its digits, such as1-205-555-0199, whatever theItuE164InternationalNumberStyles; remove any grouping before parsing.ItuE164InternationalNumber.CreateNumberForNetwork(countryCode, identificationCode, subscriberNumber)throwsArgumentExceptionfor an Identification Code not assigned under the Country Code, such asIC110(883) withGMSS(881).ItuE164InternationalNumber.ParseandTryParsethrowArgumentOutOfRangeExceptionfor anumberStylesvalue with a bit that noItuE164InternationalNumberStylesmember defines.ItuE164InternationalNumber.ToStringandTelephonyInfoformatting throwFormatExceptionfor a pattern without a placeholder for every digit of the number, instead of dropping digits.
New:
MimeQuotedPrintableDecoderOptions.AllowLongLinesaccepts quoted-printable lines longer than 76 characters (RFC 2045 §6.7 note 5).
Fixed:
- The package now includes its XML documentation, so IntelliSense shows member descriptions.
MimeCharsetResolverreturns a new instance of a built-in encoding on each call, so a caller that changes itsEncoderFallbackorDecoderFallbackno longer changes the encoding other callers get.MimeDataUri.TryParseno longer treats a percent-encoded/,;or=in the media type as a delimiter (RFC 2397 §3).MimeDataUri.TryParseaccepts type, subtype and parameter names that are RFC 2045 tokens, such astext/x-a~b, so it reads everythingMimeDataUri.Createwrites.MimeDataUri.Createpercent-encodes/,;and=in a quoted parameter value.- A
MimeParameterread withMimeMediaTypeParseOptions.AllowUnknownCharsetsin a character set that couldn't be resolved is written back as its octets in that character set (UNKNOWN-8BITwhen it gave none), not as different text labelled UTF-8. - The netstandard1.1 build decodes runtime and custom character sets as the other builds do: invalid octets become U+FFFD with
AllowInvalidOctets, and valid ISO-2022-JP values are accepted. Encoder.ConvertandDecoder.Convertof the built-in encodings accept empty input, and the netstandard1.1UTF-32decoder fits the arrayGetMaxCharCountsizes.- On netstandard2.0,
ISO-8859-1fromMimeCharsetResolveruses the caller's fallbacks, andUTF-16andUTF-32have aBodyNameandHeaderName. - The quoted-printable decoder removes trailing spaces and tabs (transport padding) of any length, instead of rejecting a run of more than 76 before a line break.
- In a comment, a "Q"-encoded word may now contain a literal double quote, and one is written as itself rather than as
=22(RFC 2047 §5(2) erratum 504). MimeEncodedWord.DecodeTextwithAllowSplitCharactersreads a character split between words in the byte order that a byte order mark earlier in the run gives, and in the mode an ISO-2022 character set such as ISO-2022-JP is in at the end of the word before.- "Q"-encoded words (
MimeEncodedWord, and the "Q" modes ofMimeQuotedPrintable) accept lower-case hexadecimal digits such as=c3=a9by default, which RFC 2047 §4.2 allows. MimeMediaTypeaccepts lower-case hexadecimal digits in RFC 2231 extended parameter values, such as%c3%a9, by default (RFC 2231 §7, RFC 822 §2.1).MimeCharsetResolverreadsISO-10646-UCS-2andcsUnicodeas big-endian and holds them to the Basic Multilingual Plane, as the IANA registry requires, instead of reading them as little-endian UTF-16.MimeCharset.TryGetDefaultgivesUTF-8fortext/csv,text/turtle,text/vtt,text/javascriptandtext/ecmascript, and no default fortext/xml-external-parsed-entity, as their registrations say.- Quoted parameter values accept the US-ASCII control characters that RFC 822 allows, as text or as quoted-pairs, instead of rejecting them.
MimeMediaType.TreereportsStandards, notUnregistered, for subtypes that start withx-, such asapplication/x-www-form-urlencoded(RFC 6838 §3.4).MimeMediaTypeParseOptions.AllowQuotedExtendedValuesaccepts an apostrophe in the value, as its docs say.default(MimeParameter).TryFormatandFormatSectionsno longer throw.MimeEncodedWordno longer writes a word longer than 75 characters, accepted withMimeEncodedWordParseOptions.AllowLongWords; its text is written as encoded words within the RFC 2047 §2 limit.- MimeBase64Encoder in MIME mode makes progress with a destination of 4 or 5 characters at the end of a line.
MimeMediaTypecompares theaccess-typeandpermissionvalues ofmessage/external-bodywithout regard to case, andmodetoo when the access-type isftp,anon-ftportftp(RFC 2046 §5.2.3).MimeCharset.TryGetDefaultreturnsfalsefor atextsubtype with the+xmlsuffix, such astext/foo+xml, which has no default character set (RFC 7303 §4.2), instead of givingUS-ASCII.ItuE164InternationalNumber.Parse,TryParseandCreateNumberForNetwork(ulong)accept a network number whose Subscriber Number has one digit, such as+88165.ItuE164InternationalNumber.TryParsereturnsfalsefor anullstring instead of throwing, andParsenames the parameterswhen it throwsArgumentNullException.- A new
ItuE164InternationalNumberFormatInfohas the invariant patterns, so theiandIformats no longer give an empty string, and setting either pattern tonullthrowsArgumentNullException. - With
TelephonyInfoas the format provider,string.Formatformats arguments that aren't E.164 numbers with the current culture. TelephonyInfotakes the neutral number patterns from the invariant culture, not the current UI culture.- ItuE164InternationalNumber.TryParse returns false for a number with decimal digits other than 0-9.
Deprecated and removed:
MimeMediaTypeParseOptions.AllowLowercaseHexDigitsandMimeEncodedWordParseOptions.AllowLowercaseHexDigitsare obsolete and have no effect, as lower-case hexadecimal digits are always accepted; they will be removed in a future major version.