* Re: [Comm] Неправильная сортировка в консоли? @ 2006-10-12 20:47 ` Sergey Stepanov 2006-10-12 20:50 ` Damir Shayhutdinov 2006-10-12 22:18 ` Pavel Usischev 0 siblings, 2 replies; 3+ messages in thread From: Sergey Stepanov @ 2006-10-12 20:47 UTC (permalink / raw) To: Damir Shayhutdinov; +Cc: ALT Linux Community > > 2. > > Я даю команду > > > > #LC_COLLATE=C > > > > Проверяю > > > > #set | grep LC_COLLATE > > > > Все в порядке, переменная LC_COLLATE имеет значение C. > > > > Затем даю команду > > > > #locale > > > > В выводимом списке значение переменной LC_COLLATE установлено > > как "ru_RU.KOI8-R" > > > > Я не пойму, это две разных переменных с одинаковым именем? > Нет. locale учитывает значение переменной LC_ALL (которая создана > специально чтобы не надо было переопределять все по отдельности). > Сделайте > LC_ALL= locale > чтобы увидеть это. Сделал. Что и где я могу увидеть? Команды #set | grep LC_COLLATE и #locale дают те же результаты. (Вот. О чем мы в смокиром и говорили. :-\ Нормальный ответ должен бы выглядеть примерно так: Нет. Формально это не две разных переменных с одинаковым именем. Переменная LC_COLLATE, которая выставляется через команду #set - это обычная системная переменная. А переменная LC_COLLATE, которую вы видите в выводе команды #locale - это переменная, существующая в рамках программы locale. Программа locale является системным механизмом локализации, и напрямую связана с выбором объектов локализации. В вашем случае, объект локализации - это алгоритм сортировки, который отличается для разных языков. Все правильные программы, для выяснения с какими объектами локализации им нужно работать, обращаются не напрямую к системным переменным, а к механизму locale, который предоставляет данные о настройке тех или иных объектов локализации (как делать сортировку, как форматировать дату, какая кодовая страница и.т.д.)... Далее я написать не могу, потому что окончательно запутался, читая доки, возможно два абзаца выше - полный бред. Но думаю что смысл понятен, как по-хорошему должен выглядеть ответ.) Со всяческими пожеланиями, Сергей. http://xi.net.ru ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] Неправильная сортировка в консоли? 2006-10-12 20:47 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov @ 2006-10-12 20:50 ` Damir Shayhutdinov 2006-10-12 22:18 ` Pavel Usischev 1 sibling, 0 replies; 3+ messages in thread From: Damir Shayhutdinov @ 2006-10-12 20:50 UTC (permalink / raw) To: Sergey Stepanov; +Cc: ALT Linux Community > Далее я написать не могу, потому что окончательно запутался, > читая доки, возможно два абзаца выше - полный бред. Но думаю > что смысл понятен, как по-хорошему должен выглядеть ответ.) Да. Я все понял. Полный наукообразный бред - наше все. Для вас лучше такой бред чем предложение таки прочитать документацию. Мне с вами на этом пути не по пути. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] Неправильная сортировка в консоли? 2006-10-12 20:47 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov 2006-10-12 20:50 ` Damir Shayhutdinov @ 2006-10-12 22:18 ` Pavel Usischev 1 sibling, 0 replies; 3+ messages in thread From: Pavel Usischev @ 2006-10-12 22:18 UTC (permalink / raw) To: Sergey Stepanov, ALT Linux Community Sergey Stepanov пишет: > Нормальный ответ должен бы выглядеть примерно так: [skipped] > Далее я написать не могу, потому что окончательно запутался, > читая доки, возможно два абзаца выше - полный бред. А теперь сравните с таким ответом: $ locale |grep LC_COLLATE LC_COLLATE="ru_RU.KOI8-R" $ LC_COLLATE=C $ locale |grep LC_COLLATE LC_COLLATE="ru_RU.KOI8-R" $ export LC_COLLATE $ locale |grep LC_COLLATE LC_COLLATE=C На причины происходящего, кстати, в этой ветке было указано. -- С уважением, Павел Усищев ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-12 22:18 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-10-12 20:47 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov 2006-10-12 20:50 ` Damir Shayhutdinov 2006-10-12 22:18 ` Pavel Usischev
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