Re: C locale sort in src/tools/make_ctags - solved
| От | Nicolai Tufar |
|---|---|
| Тема | Re: C locale sort in src/tools/make_ctags - solved |
| Дата | |
| Msg-id | 000101c3e9d3$28b13820$5400a8c0@ntufar обсуждение исходный текст |
| Ответ на | Re: C locale sort in src/tools/make_ctags (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-patches |
Thanks to Peter Eisentraut, Bruce Momjian and Tom Lane.
With the second CVS commit by Bruce Momjian it works fine now.
Peter Eisentraut <peter_e@gmx.net> wrote:
> > On second look, the patch is completely wrong anyway, because it
does
> > not export the variables; it depends on the user having exported
them
> > beforehand.
I stand corrected.
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I saw that, but it seemed a non-problem to me: if the variables have
not
> been exported then they won't affect the sort program anyway.
[...]
> What I suspect is that Nicolai's environment supplies an explicit
value
> for LC_COLLATE, overriding both LC_ALL and LANG. If we want to be
> bulletproof against that, then none of the proposals in this thread
are
> correct, and the correct patch is
>
> + LC_COLLATE=C
> + export LC_COLLATE
In my environment everything but LANG is set to tr_TR:
$ locale
LANG=tr_TR
LC_CTYPE="tr_TR"
LC_NUMERIC="tr_TR"
LC_TIME="tr_TR"
LC_COLLATE="tr_TR"
LC_MONETARY="tr_TR"
LC_MESSAGES="tr_TR"
LC_PAPER="tr_TR"
LC_NAME="tr_TR"
LC_ADDRESS="tr_TR"
LC_TELEPHONE="tr_TR"
LC_MEASUREMENT="tr_TR"
LC_IDENTIFICATION="tr_TR"
LC_ALL=
$
Method you suggested:
LC_COLLATE=C
export LC_COLLATE
works fine too.
Bruce Momjian <pgman@candle.pha.pa.us> wrote:
>
> OK, new code is:
>
> LC_ALL=C
> export LC_ALL
> sort tags >/tmp/$$ && mv /tmp/$$ tags
It works as expected. Thanks a lot.
Best regards,
Nicolai Tufar
В списке pgsql-patches по дате отправления: