How to do a locale sort with Turkish characters with UEStudio v21.00?

How to do a locale sort with Turkish characters with UEStudio v21.00?

3
NewbieNewbie
3

    Jun 11, 2021#1

    UEStudio doesn't sort correctly Turkish characters. What can I do to solve this problem?

    UEStudio is sorting like this order:

    Code: Select all

    abcdefghijklmnopqrstuvwxyzçöüğış
    It must be like this:

    Code: Select all

    abcçdefgğhıijklmnoöpqrsştuüvwxyz

    6,636551
    Grand MasterGrand Master
    6,636551

      Jun 12, 2021#2

      The command Sort supports only sorting of lines, not sorting of characters within a line.

      Please read first my post at UE 28.00.0.114 on Win 7x64 does not correctly sort word list on using a Croatian locale sort.

      Open Advanced - Settings or Configuration - File handling - Encoding and select for setting Default code page (for ANSI encoding) the list item 1254 (ANSI - Turkish) and for setting Locale (used for sort and time/date) the list item tr-TR, Turkish (Turkey) and close the configuration dialog with a click on button X.

      The next step is not necessary if there is already shown in the status bar at bottom UTF-8 or UTF-16 as automatically detected encoding of the active file to sort. Otherwise with the file with the lines to sort already opened make sure it is a Unicode encoded file and not a 1254 ANSI encoded file, for example by right clicking on the file tab of the file, opening in the opened context menu the submenu Conversions and clicking on menu item ASCII to Unicode.

      Next click on second ribbon tab Edit in last but one group Sort on the down arrow below the item Sort and click in the opened popup menu on second item Advanced sort/options... to open the dialog window Advanced Sort/Options. Check first the item Use locale (slower) at the bottom and then configure the other sort options to your needs. Press key F1 to open the help and open the help page with the title Advanced sort/options command (Edit tab/Sort dropdown) to read about the sort options. Then run the sort with a click on button Sort.

      If the sort result is as expected by you and the file was ANSI encoded with code page 1254 after opening it, click once again on its file tab and click in context submenu Conversions on menu item Unicode to ASCII and select code page 1254 (ANSI - Turkish) for the conversion back to ANSI.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jun 12, 2021#3

        Hello Mofi

        Thank you for your advice. I tried everything you wrote, but I couldn't get the right results. You can see my settings and UEStudio sorting result below. I have attached the unsorted.txt and sorted.txt files. May be you want to check.

        Thank you,

        file_handling.PNG (29.16KiB)

        statusbar.PNG (4.58KiB)

        Code: Select all

        a
        b
        c
        d
        e
        f
        g
        h
        i
        j
        k
        l
        m
        n
        o
        p
        q
        r
        s
        t
        u
        v
        w
        x
        y
        z
        ç
        ö
        ü
        ğ
        ı
        ş
        Correct result:

        Code: Select all

        a
        b
        c
        ç
        d
        e
        f
        g
        ğ
        h
        ı
        i
        j
        k
        l
        m
        n
        o
        ö
        p
        q
        r
        s
        ş
        t
        u
        ü
        v
        w
        x
        y
        z
        sorted.txt (100 Bytes)   0
        unsorted.txt (128 Bytes)   0

        6,636551
        Grand MasterGrand Master
        6,636551

          Jun 12, 2021#4

          The encoding settings are correct set by you in file handling configuration dialog. 

          Both text files are already UTF-8 encoded Unicode files and for that reason there is no need to convert them temporarily for the sort to Unicode according to my tests.

          I get the correct result on opening unsorted.txt, running the sort with option Use locale (slower) and all other options set to default. Well, the sorted file unsorted.txt is not binary equal with file sorted.txt. The reason is that the lines with ı and i are exchanged on comparing sorted unsorted.txt with unmodified sorted.txt. The order of these two characters is not correct in file sorted.txt in my opinion.

          I used 32-bit English UEStudio v21.00.0.66 on English Windows 7 x64 for the locale sort tests with Turkish settings in configuration.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jun 12, 2021#5

            Hello Mofi,

            I think I found the cause of the problem. UEStudio locale list does not work correctly. Items marked with red rectangle are for Turkish language but not working correctly, next two items are (marked with green rectangle) completely different settings for Turkish but works correctly.

            I'm using Windows 10 x64 with Turkish language  UEStudio Development Environment (x64) Version 21.00.0.66

            Thank you for your help,

            file_handling_2.PNG (55.58KiB)

            6,636551
            Grand MasterGrand Master
            6,636551

              Jun 12, 2021#6

              That is interesting as the locales are loaded from the operating system as documented by Microsoft with Locales and Languages and Locale names, Languages, and Country/Region strings. I attached an image of the list as shown by UEStudio running on English Windows 7.

              I suggest to report this issue to IDM support by email with adding the information about the language and version of Windows as output on running ver in a command prompt window and shown in the window opened on running winver.
              English_Windows7_Locales.png (8.43KiB)
              Locales list as shown by 32-bit English UEStudio v21.00.0.66 on English Windows 7 x64
              Best regards from an UC/UE/UES for Windows user from Austria