Skip to content

Releases: NightOwl888/ICU4N

v60.1.0-alpha.440

v60.1.0-alpha.440 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 16 Jun 02:32

What's Changed

NOTE: This release is API-compatible with 60.1.0-alpha.436 and includes the latest updates and bug fixes. There are no breaking API changes, so it serves as a drop-in replacement for 60.1.0-alpha.436 for users of Lucene.Net.ICU 4.8.0-beta-00017 and SaxonCS versions targeting that release.

🎉 New Features

🐞 Bug Fixes

  • Fixed concurrency issue in ReorderingBuffer that corrupted Normalizer2 output by @paulirwin in #122
  • Fixed 2 UChar tests due to incorrectly specified resources by @NightOwl888 in #127
  • Pin UI culture to fix failing tests on Linux by @paulirwin in #132
  • Fixed .NET SDK warning so it doesn't show warnings on .NET 10 or .NET 11 (fixes #118) by @NightOwl888 in #134
  • Fixed NumberFormatRules to correctly strip whitespace without the value going out of scope (fixes #129) by @NightOwl888 in #135

🏆 Improvements

Full Changelog: v60.1.0-alpha.439...v60.1.0-alpha.440

v60.1.0-alpha.439

v60.1.0-alpha.439 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 02 Nov 07:45

What's Changed

🐞 Bug Fixes

  • Fixed concurrency issue with Transliterator for Cyrillic to Latin (Fixes #113) by @NightOwl888 in #114
  • ICU4N.Dev.Test.Util.ULocaleColleationTest::TestIllformedLocale(): Fixed test failure in debug mode by @NightOwl888 in #116
  • Fixed usage of ConcurrentDictionary<TKey, TValue> to use Lazy<T> when it matters (Fixes #115) by @NightOwl888 in #117

🚀 Performance Improvements

  • Replace LinkedDictionary<TKey, TValue> with OrderedDictionary<TKey, TValue> by @zahran001 in #112

New Contributors

Full Changelog: v60.1.0-alpha.438...v60.1.0-alpha.439

v60.1.0-alpha.438

v60.1.0-alpha.438 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 29 May 12:23
10e6d5c

What's Changed

🐞 Bug Fixes

  • ICU4N.Text.CjkBreakEngine::DivideUpDictionaryRange(): Reverted optimizations by @NightOwl888 in #109

Full Changelog: v60.1.0-alpha.437...v60.1.0-alpha.438

v60.1.0-alpha.437

v60.1.0-alpha.437 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 16 May 18:21

What's Changed

💥 Breaking Changes

  • BugFix: ICU4N.Text (Normalizer + Normalizer2): Fixed access to unpinned pointers (ReorderingBuffer.GetCharsPointer() was removed from the public API) by @NightOwl888 in #101

🐞 Bug Fixes

  • Fix issue with cloned RuleBasedBreakIterator failing under heavy parallel load, #95 by @paulirwin in #96
  • ICU4N.Impl.Normalizer2Impl (TryGetDecomposition + TryGetRawDecomposition): Fixed allocation and logic bugs (fixes #103) by @NightOwl888 in #104
  • J2N.Text (OpenStringBuilder + ValueStringBuilder): Added Append(char[], int, int) overload and removed Append(ReadOnlySpan<char>, int, int) by @NightOwl888 in #107

🚀 Performance Improvements

  • SWEEP: Replace J2N's TripleShift call with C# 11's unsigned right shift operator by @paulirwin in #93

🏆 Improvements

  • Added GitHub Release Notes Template by @NightOwl888 in #94
  • Added build warning for .NET SDKs that do not support 3-letter language codes by @NightOwl888 in #102
  • ICU4N.Globalization.ResourceUtil: Added ckb to ku mapping because of NET build warning for satellite assembly name by @NightOwl888 in #106
  • Added net9.0 target framework + tests by @NightOwl888 in #108

Full Changelog: v60.1.0-alpha.436...v60.1.0-alpha.437

v60.1.0-alpha.436

v60.1.0-alpha.436 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 21 Oct 10:44

Summary

This release focuses primarily on:

  • Fixing issues with deploying satellite assemblies to the build and publish output
  • Removing support for ICharSequence and changing to ReadOnlySpan<char>
  • Removing support for StringBuilder as a character sequence, since it has documented performance problems. See: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.chars?view=net-8.0#remarks
  • Reducing unnecessary heap allocations by using the stack and/or array pool
  • Removing duplicated business logic from generated code
  • Redesigning APIs to work with Span<char> and ReadOnlySpan<char>
  • Removing support for old target frameworks (such as netstandard1.x and netcoreapp3.x)
  • Adding support for net8.0

Note that APIs that accept or return a StringBuilder are being considered for removal in a future release.

What's Changed

  • BUG: ICU4N.Reflection.AssemblyExtensions: Fixed bug that was causing GetCustomAttribute() not to function on net40 by @NightOwl888 in #47
  • Added dependency on System.Memory and enabled Span support in net451 and netstandard2.0 by @NightOwl888 in #49
  • ICU4N.Impl.ResourceKey: Removed unnecessary unsafe code from InternalSubString() method by @NightOwl888 in #50
  • ICU4N.Text.ValueStringBuilder: Added AppendCodePoint() and Remove() methods + tests by @NightOwl888 in #48
  • PERFORMANCE: ICU4N.Impl.LocaleIDParser: Converted to ref struct using ValueStringBuilder internally to reduce allocations by @NightOwl888 in #51
  • PERFORMANCE: ICU4N.Impl.RuleCharacterIterator: Fixed bottleneck when calling Lookahead() method by @NightOwl888 in #52
  • Fixed all build warnings by @NightOwl888 in #53
  • BUG: ICU4N.Impl.Utility::ParseInteger(): Fixed logic to ignore case when searching for the prefix "0x" by @NightOwl888 in #58
  • BUG: ICU4N.Text.ValueStringBuilder: Use FEATURE_STRING_IMPLCIT_TO_READONLYSPAN instead of NETCOREAPP by @NightOwl888 in #59
  • PERFORMANCE: ICU4N.Transliterator: Converted lambda style "anonymous classes" into concrete implementations by @NightOwl888 in #60
  • Converted Java array-style ref/out/return values into ref/out parameters in .NET (Fixes #57) by @NightOwl888 in #61
  • Auto-generate T4 Templates (Closes #40) by @NightOwl888 in #63
  • SWEEP: Changed naming convention suffix of T4 templates by @NightOwl888 in #64
  • Added support for Span/ReadOnlySpan in net40 by @NightOwl888 in #68
  • Dropped support for ICharSequence in favor of ReadOnlySpan/ReadOnlyMemory by @NightOwl888 in #71
  • Removed .NET Standard 1.x and .NET Core 1.x build features (Fixes #72) by @NightOwl888 in #74
  • Support building (some) satellite assemblies on macOS via Mono by @paulirwin in #75
  • Added net8.0 target and tests (Fixes #73) by @NightOwl888 in #78
  • ICU4N.Support.AnonymousComparer: Deleted because this is the same functionality as Comparer.Compare() by @NightOwl888 in #83
  • ICU4N.Impl.CacheValue::SoftValue: Removed finalizer by @NightOwl888 in #84
  • Rename numeric methods/types to conform with .NET conventions, #12 by @paulirwin in #76
  • Normalize constants/field names in Normalizer2Impl, #11 by @paulirwin in #77
  • ICU4N.Resources.csproj: Removed NETStandard.Library as a transitive dependency by @NightOwl888 in #86
  • Fix for many issues with copying, naming, and loading satellite assemblies by @NightOwl888 in #88
  • ICU4N.Resources: Include Newtonsoft.Json binaries so we don't conflict with consumers by @NightOwl888 in #89
  • .build/dependencies.props: Added version constraint by @NightOwl888 in #90

New Contributors

Full Changelog: v60.1.0-alpha.402...v60.1.0-alpha.436

v60.1.0-alpha.402

v60.1.0-alpha.402 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 02 Apr 15:42
1545efb

Known Issues

  1. The ICU4N.FormatNumberRuleBased uses the .NET formatter and replaces the ASCII digit output with native digits of the current language. This formatter doesn't support all of the features of DecimalFormat. Once known issue with it is that it doesn't follow the "half even" or "round toward even" rounding as is in the IEEE 754 specfication. See TR35#Rounding. Instead it rounds "toward positive infinity". To our knowledge, this only affects behavior of floating point numbers when they are larger than the value of Int64.MaxValue (9,223,372,036,854,775,807; that is, hexadecimal 0x7FFFFFFFFFFFFFFF) or smaller than Int64.MinValue (negative 9,223,372,036,854,775,808; that is, hexadecimal 0x8000000000000000), however, there may be other cases where rounding is incorrect when plural formatting is part of the rule.

Change Log

Breaking Changes

  1. ICU4N.Impl.ResourceKey::Substring(): Converted from start/end to startIndex/length to match .NET conventions. Optimized to use ValueStringBuilder, where Span<T> is supported.
  2. ICU4N.Impl.PluralRulesLoader + ICU4N.Text.PluralRules: Renamed ForLocale() > GetInstance() to match .NET naming conventions.
  3. ICU4N.Text.NumberPresentation: Moved NumberPresentation enum and NumberPresentationExtensions class from the ICU4N.Text to ICU4N.Globalization namespace. Changed the values to start with 0 instead of 1 so we have a reasonable default value in .NET.
  4. ICU4N.Globalization.UCultureInfo: Removed ClearCachedData() method. This is in .NET only to allow it to fetch culture settings that have changed in the underlying OS.
  5. ICU4N.Text (DisplayContext + DisplayContextType + DisplayContextExtensions): Removed from the public API since they had been previously refactored in the ICU4N.Globalization namespace as Capitalization, DialectHandling, DisplayLength, and SubstituteHandling enums and the DisplayContextOptions class.
  6. ICU4N.Text (NumberFormat + DecimalFormat + RuleBasedNumberFormat): Removed from the public API and added an IncludeLegacyNumberFormat build property so they can be optionally compiled for those who need these features. The plan is to port the remaining frunctionality that isn't already covered by FormatNumberRuleBased into static APIs later.
  7. ICU4N.Globalization.Capitalization: Added "For" prefix to the names as they were in ICU4J, since this adds clarity to their intended purpose. Also explicitly specified numeric values of Capitalization, DialectHandling, DisplayLength, and SubstituteHandling enums in ICU4N.Globalization to match ICU4J numeric values.

New Features

1.ICU4N.Impl.PatternProps: Added WhiteSpace static field with the same values that are matched with PatternProps.IsWhiteSpace() for use in Trim() method overloads.
8. Added new FormatNumberRuleBased static class to act as the new API for the ICU4J RuleBasedNumberFormat functionality. This API consists of extension methods for the numeric data types:

  1. ICU4N.Globalization: Added NumberFormatRules class to serve as the rules engine for the Rule-based Number Format functionality. This class is immutable and thread safe. Optimized Rule-based Number Format rule description string parsing to eliminate unnecessary substring allocations.
  2. ICU4N.Text (SplitTokenizerEnumerator + MultiDelimiterSplitTokenizerEnumerator): Added features to control delimiter length to exclude from the token and trim behavior for start/end/both (or specify no trimChars for no trimming)
  3. ICU4N.Globalization: Added UNumberFormatInfo class to cover the .NET NumberFormatInfo API. This class can be instantiated and used in the same way as the .NET API.
  4. ICU4N.Globalization.UNumberFormatInfo: Added SpellOut, Ordinal, Duration, and NumberingSystem properties to expose the rules engines and DefaultRuleSetName and RuleSetNames properties publicly. These can be used to deterimine the ruleSetName to pass to the FormatNumberRuleBased APIs.
  5. ICU4N.Globalization.UNumberFormatInfo: Added Capitalization property (DisplayContext enum in ICU4J).
  6. ICU4N: Added IcuNumber internal class to serve as the business logic layer for formatting and parsing. Added formatters for long and double to output native digits + tests to confirm that they are the same as the DecimalFormat instance that backs RuleBasedNumberFormat. Also added FormatPlural() method + tests and FormatXXXRuleBased() overloads to prepare the parameters for the call into the rules engine (NumberFormatRules) that is passed.
  7. ICU4N.Text.ValueStringBuilder: Added Insert() overload to handle ReadOnlySpan<char>
  8. Added target for .NET 7.0. Fixed conflicts due to the new AsReadOnly() extension methods and build errors due the unsafe logic in PluralRules.

Improvements

  1. PERFORMANCE: ICU4N.Globalization.UCultureInfo.Name: Cache the name locally so it doesn't have to be parsed on every request.
  2. ICU4N.Globalization.UCultureInfo::Canonicalize(): Added null guard clause
  3. ICU4N.Impl.PluralRulesLoader + ICU4N.Text.PluralRules: Added GetInstance() overload that accepts the culture name as a string, for use by internal UCultureData class.
  4. ICU4N.Globalization.UNumberFormatInfoTest: Added tests to verify all cultures load decimal format settings correctly (we still have some way to go for currency data)
  5. ICU4N.Globalization.NumberPresentationExtensions: Added IsDefined() method so we can quickly check for valid values in guard clauses.
  6. ICU4N.Numerics.DecimalQuantity_AbstractBCD: Optimized number parsing using ReadOnlySpan<char> where appropriate.
  7. Changed the name of FEATURE_READONLYDICTIONARY to FEATURE_IREADONLYCOLLECTIONS to include IReadOnlyList<T>.
  8. ICU4N.Globalization.NumberPresentationExtensions: Added an internal extension method to quickly lookup the NumberingSystemRules instance for the current UNumberFormatInfo.
  9. ICU4N.Globalization.UCultureInfo: Added ReadOnly() and Clone() implementations and added API documentation for NumberFormat, IsReadOnly, ReadOnly() and Clone() members.
  10. ICU4N.Impl.ICUResourceBundle.WholeBundle: Lazy-load the UCultureInfo instance so we don't fill up the UCultureData cache with all cultures and non-culture resource names.

Bug Fixes

  1. ICU4N.Util.ResourceBundle::SetRootType(): Fixed fallthrough to default for Missing case

v60.1.0-alpha.401

v60.1.0-alpha.401 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 04 Mar 09:57
172205e

Known Issues

  1. This package contains a preview of RuleBasedBreakIterator which has dependencies on DecimalFormat, DecimalFormatSymbols, NumberFormat, and Formatter. These will not be made public in the final release, so use these features at your own peril.

Change Log

  1. Changed to use official buildTransitive NuGet feature instead of using a viral copy of the ICU4N.targets file. This allows more options for including subsets of resource data.
  2. Updated README.md with a Managing Resources section.

v60.1.0-alpha.400

v60.1.0-alpha.400 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 03 Mar 17:23

Known Issues

  1. This package relies on an unofficial "viral" copy of the ICU4N.targets file during dotnet pack for the transitive dependency to be distributed to consumers. It is recommended to use v60.1.0-alpha.401 or higher, which uses the official buildTransitive NuGet support. This will prevent collisions for consumers that use their own build/<packageName>.targets file.
  2. This package contains a preview of RuleBasedBreakIterator which has dependencies on DecimalFormat, DecimalFormatSymbols, NumberFormat, and Formatter. These features will not be made public in the final release, so use at your own peril.

Change Log

  1. BREAKING: Restructured NuGet packaging and assemblies. There is now only 1 main assembly, ICU4N.dll (in the package ICU4N) and a separate NuGet package ICU4N.Resources that contains satellite assemblies. Resources are no longer included in the main assembly. This provides the following benefits:
    1. We can target additional frameworks without having to include additional copies of the resource data
    2. End users can choose to exclude resource data in distributions for languages that are not required. NOTE: The neutral language cultures contain shared resource data for specific cultures, so don't delete the neutral language file (such as fr/ICU4N.resources.dll unless all of the specific cultures (such as fr-CA/ICU4N.resources.dll) are also deleted.
  2. Created ICU4J Resource Converter tool to transform resource files into satellite assemblies
  3. Updated build to generate satellite assemblies incrementally and download ICU4J JAR files during the build.
  4. Added tests to verify satellite assembly loading.
  5. Added support for loading raw resource files from the local /data folder if it exists. Local resource files override satellite assembly data. The structure is the same as ICU4J, excluding the top-level /impl folder.
  6. Updated Azure DevOps build script to run the tests in parallel background tasks.
  7. Added RuleBasedNumberFormat and dependencies + tests. NOTE: This API matches ICU4J, but we plan to build a .NET-like API to supersede this one.
  8. BUG: ICU4N.Support.Globalization.ResourceUtil: Ensure resource names are converted with both forward and backward slashes.
  9. BUG: ICU4N.Text.MessagePattern: use J2N.Collections.Generic.List<T> because the Equals() method compares structural equality.
  10. BUG: ICU4N.Text.MessageFormat: Use J2N.Collections.Generic.Dictionary<TKey, TValue> because this uses structural equality.
  11. BUG: ICU4N.Text.PluralFormat: Corrected append length calculation.
  12. BUG: ICU4N.Text.MessagePattern: Fixed 3 Append() calls to calculate the correct length
  13. BUG: ICU4N.Text.SelectFormat: Corrected Append() method length calculations in 3 places
  14. BUG: ICU4N.Text.MessageFormat: Corrected Append() method length calculations in 4 places
  15. Added net6.0 target support.
  16. ICU4N.Text.PluralRules: added TryParse() overloads and made use of ReadOnlySpan<char> to reduce allocations when loading rules. Added SplitTokenEnumerator and MultiCharSplitTokenEnumerator structs to tokenize rule strings without allocating substrings.
  17. ICU4N.Impl.PluralRulesLoader: Refactored to use PluralRules.TryParseRule() directly instead of building a description string from the resource data only to parse the data back out again. Encapsulated HasExplicitBoundingInfo logic inside of RuleList.AddRule() so it doesn't have to be duplicated.
  18. ICU4N.Text.PluralRules.RuleList: Refactored to use Dictionary instead of List as the underlying collection to take advantage of hashtable lookups and remove a large amount of looping code.
  19. ICU4N.Text.MessagePatternPart: Eliminated static array allocation, since we can do a direct cast to the Enum symbol in .NET. Explicitly numbered MessagePatternArgType symbols.
  20. Directory.Build.props: Upgraded LangVersion to 9.0
  21. BUG: ICU4N.Text.CurrencyPluralInfo: Use J2N dictionary for structural equality
  22. Added tests for net7.0.
  23. Changed test target from net461 to net48.

v60.1.0-alpha.356

v60.1.0-alpha.356 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 15 Jan 05:55

Change Log

  1. Added Source Link Support
  2. Added local dependency on Microsoft.NETFramework.ReferenceAssemblies to remove dependency on .NET Framework Targeting Pack during builds
  3. Fixed XML documentation so it will be included in the NuGet package
  4. Updated build with the latest features
    • Use latest SDKs for build and tests (6.0.101, 5.0.404, 3.1.416)
    • Added readme.md to NuGet package
    • Added target-framework-conditional support for dependencies.props
    • Added .gitattributes file
    • Added CLI build script for Windows, macOS, and Linux
    • Added documentation for building, testing, releasing
    • Renamed build directory to .build
    • Added PrintTargetFrameworks MSBuild target to read the supported target frameworks for a given test project
    • Added SkipGitVersioning MSBuild property to remove the Nerdbank.GitVersioning NuGet package reference when creating versions via scripts
    • Updated azure-pipelines.yml to allow overriding version info using parameters
  5. Upgraded J2N package dependency to 2.0.0

v60.1.0-alpha.355

v60.1.0-alpha.355 Pre-release
Pre-release

Choose a tag to compare

@NightOwl888 NightOwl888 released this 24 Oct 22:15

Change Log

  1. BREAKING: ICU4N.Collation.Text.CollationElementIterator::Ingorable: Renamed Ignorable (fixes #35)
  2. BUG: ICU4N.Util.VersionInfo.INVALID_VERSION_NUMBER_: Corrected invalid version number string (fixes #36)
  3. Upgraded to J2N 2.0.0-beta-0017
  4. ICU4N.Support.Text.ChoiceFormat: Fixed ambiguous reference caused by the new J2N.Numerics.Double class
  5. Added tests for .NET 6.0 RC2
  6. Changed build to use ubuntu-latest and macOS-latest during tests
  7. BUG: ICU4N.Tests.Support.Globalization.UCultureInfoTest::TestDisplayKeyword(): Test using display culture. ICU was using culture of the current thread instead, which may be different than the display culture.
  8. BUG: ICU4N.Support.Globalization.UCultureInfo::GetFullName(): Fixed cache initialization issue for creating a nameCache entry
  9. ICU4N.Dev.Test.Collate.CollationServiceTest::TestRegisterFactory(): Ignore test failures on Linux until #37 can be resolved