Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong sorting of filenames in Ukrainian #4407

Open
mc-butler opened this issue Sep 19, 2022 · 6 comments
Open

Wrong sorting of filenames in Ukrainian #4407

mc-butler opened this issue Sep 19, 2022 · 6 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.8.26 Reproducible in version 4.8.26

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4407
Reporter aj (acid@….kiev.ua)
Keywords sorting, order, Ukrainian

Hello.
mc sorts filenames in Ukrainian language in wrong order.

You can compare order with https://en.wikipedia.org/wiki/Ukrainian_alphabet

Package is from Debian and has version 3:4.8.26-1.1.

$ LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.26
Built with GLib 2.66.8
Built with S-Lang 2.3.2 with terminfo database
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:

cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish

Data types:

char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

$ LC_MESSAGES=C mc -F
mc --configure-options
Home directory: /home/jack
Profile root directory: /home/jack

[System data]

Config directory: /etc/mc/
Data directory: /usr/share/mc/
File extension handlers: /usr/lib/mc/ext.d/
VFS plugins and scripts: /usr/lib/mc/

extfs.d: /usr/lib/mc/extfs.d/
fish: /usr/lib/mc/fish/

[User data]

Config directory: /home/jack/.config/mc/
Data directory: /home/jack/.local/share/mc/

skins: /home/jack/.local/share/mc/skins/
extfs.d: /home/jack/.local/share/mc/extfs.d/
fish: /home/jack/.local/share/mc/fish/
mcedit macros: /home/jack/.local/share/mc/mc.macros
mcedit external macros: /home/jack/.local/share/mc/mcedit/macros.d/macro.*

Cache directory: /home/jack/.cache/mc/

'--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' 'X11_WWW=x-www-browser' '--libexecdir=/usr/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--disable-silent-rules' '--enable-aspell' '--enable-vfs-sftp' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/mc-xlv0ck/mc-4.8.26=. -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by aj (acid@….kiev.ua) on Sep 19, 2022 at 11:54 UTC

Screenshot with single letter filenames from Ukrainian alphabet

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 19, 2022 at 12:34 UTC (comment 1)

What is your locale?

@mc-butler
Copy link
Author

Changed by aj (acid@….kiev.ua) on Sep 19, 2022 at 12:36 UTC (comment 1.2)

Replying to andrew_b:

What is your locale?

$ locale
LANG=uk_UA.UTF-8
LANGUAGE=
LC_CTYPE="uk_UA.UTF-8"
LC_NUMERIC="uk_UA.UTF-8"
LC_TIME="uk_UA.UTF-8"
LC_COLLATE="uk_UA.UTF-8"
LC_MONETARY="uk_UA.UTF-8"
LC_MESSAGES="uk_UA.UTF-8"
LC_PAPER="uk_UA.UTF-8"
LC_NAME="uk_UA.UTF-8"
LC_ADDRESS="uk_UA.UTF-8"
LC_TELEPHONE="uk_UA.UTF-8"
LC_MEASUREMENT="uk_UA.UTF-8"
LC_IDENTIFICATION="uk_UA.UTF-8"
LC_ALL=

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 19, 2022 at 13:27 UTC (comment 3)

Is it case sensitive sort by name? Does ls sort these files correctly?

@mc-butler
Copy link
Author

Changed by aj (acid@….kiev.ua) on Sep 20, 2022 at 9:44 UTC (comment 3.4)

Replying to andrew_b:

Is it case sensitive sort by name? Does ls sort these files correctly?

Yes, it is case sensitive. Sorting is wrong with few letters (є і ї ґ) in the filenames.

For example «Є» have to be after «Е» and before «Ж» (same as «є» should be after «е» and before «ж»). And in mc «Є» is first letter before «А» and «є» after «я».

Looks like є і ї ґ are outside the alphabet (аА-яЯ).

@mc-butler
Copy link
Author

Changed by aj (acid@….kiev.ua) on Sep 20, 2022 at 12:26 UTC (comment 5)

Oops. Missed question with 'ls'
ls sorts right:
$ ls -1
А
Б
В
Г
Ґ
Д
Е
Є
Ж
З
И
І
Ї
Й
К
Л
М
Н
О
П
Р
С
Т
У
Ф
Х
Ц
Ч
Ш
Щ
Ь
Ю
Я

$ ls -1
а
б
в
г
ґ
д
е
є
ж
з
и
і
ї
й
к
л
м
н
о
п
р
с
т
у
ф
х
ц
ч
ш
щ
ь
ю
я

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.8.26 Reproducible in version 4.8.26
Development

No branches or pull requests

1 participant