From: "Denis G. Samsonenko" <d.g.samsonenko@gmail.com>
To: community@lists.altlinux.org
Subject: Re: [Comm] Неправильная сортировка в консоли?
Date: Fri, 13 Oct 2006 21:36:25 +0900
Message-ID: <957265820610130536x33cf2a76k8be3307a922eff7b@mail.gmail.com> (raw)
In-Reply-To: <E1GYM7L-000K3x-00.dlagovna-mail-ru@f84.mail.ru>
Вечер добрый!
13.10.06, Sergey Stepanov написал:
> Если LC_COLLATE не выставлено как C, то алгоритм сортировки
> при обработке строк пропускает небуквенные символы.
> Поэтому сортировка "неправильная". Зато по русскому алфавиту.
>
> Если LC_COLLATE=C то строки сортируются в чистом виде,
> не сбрасывая со счетов небуквенные символы. Сортировка
> в этом случае "правильная". Но зато не по русскому алфавиту.
>
> Вопрос. Как же сделать так, чтобы и сортировка шла по алфавиту,
> и "небуквенные" символы учитывались при сортировке?
Интересный вопрос. А каков критерий правильности? На сколько я
понимаю, при локали C, сортирующий механизм ничего не знает о буквах,
и сотрирует согласно кодам символов в ASCII. Когда же вы
устанавливаете локаль в отличное от C значение, то сортировка идёт в
том порядке, в котором это указано в данной локали. И тут уже
сортируются с буквы, а не коды символов. Вероятно, как сортировать
небуквенные символы просто не задано. Да и не понятно, как их
сортировать, каков должен быть порядок, должны они идти до букв или
после, а может часть до, а часть после? Каков критерий этой вашей
"правильности"?
--
Всего доброго,
Денис.
prev parent reply other threads:[~2006-10-13 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-13 12:26 ` Sergey Stepanov
2006-10-13 12:36 ` Denis G. Samsonenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=957265820610130536x33cf2a76k8be3307a922eff7b@mail.gmail.com \
--to=d.g.samsonenko@gmail.com \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git