dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

System.Globalization.CompareOptions update

Open daverayment opened this issue 1 year ago • 2 comments

Summary

  • New remarks section describing the change in .NET 5 to use the ICU library, which changes the default sort order and affects the behaviour of comparing against ligature characters.
  • Rewrote descriptions for each of the options, simplifying language and improving consistency.
  • New code example which details how each of the CompareOptions enum values affect string comparisons, for all four supported languages.
  • Updated StringSort code example, which now uses more modern and consistent .NET conventions, and includes a note about changes brought about in .NET 5 (where StringSort and None are now equivalent by default).
  • Added StringSort F# example.

Additional Globalization documentation update in main dotnet/docs repo PR: 41661

Fixes #41052

daverayment avatar Jul 05 '24 14:07 daverayment

@dotnet-policy-service agree

daverayment avatar Jul 05 '24 14:07 daverayment

Learn Build status updates of commit a5e9fb8:

:warning: Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareOptions.xml :warning:Warning View Details
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/CPP/compareoptions_stringsort.cpp :white_check_mark:Succeeded View
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/CPP/compareoptions_values.cpp :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_stringsort.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_values.fs :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb :white_check_mark:Succeeded View

xml/System.Globalization/CompareOptions.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Tagging subscribers to this area: @dotnet/area-system-globalization

@daverayment Thanks for submitting the PR! Would you be able to fix the errors here: https://github.com/dotnet/dotnet-api-docs/actions/runs/9810025035/job/27168649470?pr=10087? I don't believe your changes caused them, but since we're already modifying the code, it would be great to address them.

Also, did you run the updated samples to ensure everything works correctly?

tarekgh avatar Mar 28 '25 22:03 tarekgh

@daverayment would you have a chance to address the minor remaining feedback so we can proceed merging this one?

tarekgh avatar Apr 01 '25 16:04 tarekgh

@tarekgh Thank you for the review.

I'm sorry, I don't have time to revisit this at the moment. I don't know how to add the parent project, so perhaps you could help?

daverayment avatar Apr 01 '25 21:04 daverayment

Learn Build status updates of commit a5e9fb8:

:warning: Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareOptions.xml :warning:Warning View Details
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/CPP/compareoptions_stringsort.cpp :white_check_mark:Succeeded View
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/CPP/compareoptions_values.cpp :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_stringsort.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_values.fs :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb :white_check_mark:Succeeded View

xml/System.Globalization/CompareOptions.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@gewarren do you know who can help guide how we can fix the issues with this PR?

  • https://github.com/dotnet/dotnet-api-docs/pull/10087#user-content-10ffc2784250d1cb2b96fc8f9f05481a-8e61ecc0
  • https://github.com/dotnet/dotnet-api-docs/actions/runs/14208294553/job/39810584209?pr=10087

tarekgh avatar Apr 02 '25 00:04 tarekgh

CC @BillWagner if can help too.

tarekgh avatar Apr 02 '25 16:04 tarekgh

Learn Build status updates of commit 7ff5368:

:warning: Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareOptions.xml :warning:Warning View Details
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/CPP/compareoptions_stringsort.cpp :white_check_mark:Succeeded
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/CPP/compareoptions_values.cpp :white_check_mark:Succeeded
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/Program.cs :white_check_mark:Succeeded
snippets/csharp/System.Globalization/CompareOptions/Overview/Project.csproj :white_check_mark:Succeeded
snippets/fsharp/System.Globalization/compareoptions_stringsort.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_values.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/Project.fsproj :white_check_mark:Succeeded
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/Project.vbproj :white_check_mark:Succeeded
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/Project.vbproj :white_check_mark:Succeeded

xml/System.Globalization/CompareOptions.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.
  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Learn Build status updates of commit 448db5d:

:warning: Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareOptions.xml :warning:Warning View Details
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/CPP/compareoptions_stringsort.cpp :white_check_mark:Succeeded n/a (file deleted or renamed)
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs :white_check_mark:Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/Program.cs :white_check_mark:Succeeded
snippets/csharp/System.Globalization/CompareOptions/Overview/Project.csproj :white_check_mark:Succeeded
snippets/fsharp/System.Globalization/compareoptions_stringsort.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/compareoptions_values.fs :white_check_mark:Succeeded View
snippets/fsharp/System.Globalization/Project.fsproj :white_check_mark:Succeeded
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/Project.vbproj :white_check_mark:Succeeded
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb :white_check_mark:Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/Project.vbproj :white_check_mark:Succeeded

xml/System.Globalization/CompareOptions.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.
  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please: