* Re: [Comm] Неправильная сортировка в консоли? @ 2006-10-12 23:05 ` Sergey Stepanov 2006-10-13 2:23 ` Denis G. Samsonenko 2006-10-12 23:49 ` Sergey Stepanov 1 sibling, 1 reply; 3+ messages in thread From: Sergey Stepanov @ 2006-10-12 23:05 UTC (permalink / raw) To: Pavel Usischev; +Cc: ALT Linux Community > А теперь сравните с таким ответом: > > $ 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 > > На причины происходящего, кстати, в этой ветке было указано. Ага. Непонятно другое. 1. Программы типа sort и ls не пользуются механизмом locale, а берут данные из системной переменной LC_COLLATE? Пример. # locale |grep LC_COLLATE LC_COLLATE="ru_RU.KOI8-R" # ls -1 bet_eng.png bet_esp.png betperline_eng.png betperline_esp.png betperline_por.png bet_por.png # LC_COLLATE=C # set | grep LC_COLLATE LC_COLLATE=C # locale |grep LC_COLLATE LC_COLLATE="ru_RU.KOI8-R" # ls -1 bet_eng.png bet_esp.png bet_por.png betperline_eng.png betperline_esp.png betperline_por.png 2. Насколько я понял, locale выставляет свои переменные согласно значению LC_ALL. Существуют какие-то таблицы, которые по значению LC_ALL выставляют все переменные locale в нужные значения. Вопрос. Почему разрешен экспорт системных переменных в пространство locale? Ведь таким образом нарушается сама идея локализации через locale. Почему бы в таком случае не пользоваться просто системными LC-переменными??? Со всяческими пожеланиями, Сергей. http://xi.net.ru ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] Неправильная сортировка в консоли? 2006-10-12 23:05 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov @ 2006-10-13 2:23 ` Denis G. Samsonenko 0 siblings, 0 replies; 3+ messages in thread From: Denis G. Samsonenko @ 2006-10-13 2:23 UTC (permalink / raw) To: Sergey Stepanov, ALT Linux Community День добрый! 13.10.06, Sergey Stepanov написал: > > А теперь сравните с таким ответом: > > $ 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 ... > # LC_COLLATE=C > # set | grep LC_COLLATE > LC_COLLATE=C > # locale |grep LC_COLLATE > LC_COLLATE="ru_RU.KOI8-R" ... Вам же выше уже написали в сообщении, на которое вы отвечаете, что чтобы изменения вами переменной LC_COLLATE (как и любой другой) дошли до дочернего процесса, необходимо выполнять не просто "LC_COLLATE=C", а "export LC_COLLATE=C". Или пускать вашу ls так: ...]$ LC_COLLATE=C ls -1 Так что таки читать надо что-нибудь по shell (bash), а не про локализацию, чтобы понимать, как устанавливать переменные окружения среды. -- Всего доброго, Денис. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] Неправильная сортировка в консоли? 2006-10-12 23:05 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov @ 2006-10-12 23:49 ` Sergey Stepanov 1 sibling, 0 replies; 3+ messages in thread From: Sergey Stepanov @ 2006-10-12 23:49 UTC (permalink / raw) To: Pavel Usischev; +Cc: ALT Linux Community Сорри, опечатался. В пункте 2 имел в виду не LC_ALL, а LANG. Со всяческими пожеланиями, Сергей. http://xi.net.ru ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-13 2:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-10-12 23:05 ` [Comm] Неправильная сортировка в консоли? Sergey Stepanov 2006-10-13 2:23 ` Denis G. Samsonenko 2006-10-12 23:49 ` Sergey Stepanov
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