none
How to sort list by using specific culture for myanmar RRS feed

  • Question

  • I want sort list of string by using specific culture for myanmar? How can I implement? Will it produce the correct sorted list?
    Sunday, March 24, 2019 6:04 AM

All replies

  • Check this:

       List<string> list_of_strings = . . .

     

       var ci = CultureInfo.GetCultureInfo( "my-MM" );

       var sc = StringComparer.Create( ci, true );

     

       list_of_strings.Sort( sc );

     

    If you do not want to alter the original list, then:

       List<string> new_list = list_of_strings.OrderBy( t => t, sc ).ToList();

    Sunday, March 24, 2019 7:56 AM
  • Sorry for late reply. It is possible answer but the sorted result is incorrect. I think that Microsoft doesn't support to get the correct sorted result for Myanmar. By the way, does Microsoft support ICU - International Components for Unicode (http://site.icu-project.org/)?

    Monday, March 25, 2019 1:54 AM
  • You can always report this as a problem using the icon shown from the upper right corner of Visual Studio IDE.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, March 25, 2019 2:24 AM
    Moderator
  • .NET framework localization support is relying on the system it's running on.

    Since Burmese support is added on Windows 8.1/Windows Server 2012R2, this means creating CultureInfo for my-MM will have no effect if your code is running on Win7/8.0 or Windows Server 2008/2008R2/2012.



    Monday, March 25, 2019 3:03 AM
    Answerer
  • .NET framework localization support is relying on the system it's running on.

    Since Burmese support is added on Windows 8.1/Windows Server 2012R2, this means creating CultureInfo for my-MM will have no effect if your code is running on Win7/8.0 or Windows Server 2008/2008R2/2012.



    I'm running on Window 10 (Fall Creators Update).
    Monday, March 25, 2019 3:36 AM
  • You can download the Sorting Weight Table for Win10, and then check and see if the sort order is the same as your expectation.
    Monday, March 25, 2019 4:43 AM
    Answerer