Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] trouble with to_char('L')

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] trouble with to_char('L')
Date: 2010-04-20 14:28:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers
Takahiro Itagaki wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>>> 1. setlocale(LC_CTYPE, lc_monetary)
>>> 2. setlocale(LC_MONETARY, lc_monetary)
>>> 3. lc = localeconv()
>>> 4. pg_do_encoding_conversion(lc->xxx,
>>>      FROM pg_get_encoding_from_locale(lc_monetary),
>>>      TO GetDatabaseEncoding())
>>> 5. Revert LC_CTYPE and LC_MONETARY.
> A patch attached for the above straightforwardly. Does this work?

I have 2 questions about this patch.

1. How does it work when LC_MONETARY and LC_NUMERIC are different?
2. Calling db_encoding_strdup() for lconv->grouping is appropriate?

Hiroshi Inoue

> Note that #ifdef WIN32 parts in the patch are harmless on other platforms
> even if they are enabled.
>> Let's work off what we have now to start with at least. Bruce, can you
>> comment on that thing about the extra parameter? And UTF8?
> Regards,
> ---
> Takahiro Itagaki
> NTT Open Source Software Center

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-04-20 14:45:59
Subject: Re: SpinLockAcquire question
Previous:From: Kevin GrittnerDate: 2010-04-20 14:24:38
Subject: Re: [HACKERS] Streaming replication document improvements

pgsql-general by date

Next:From: Scott MarloweDate: 2010-04-20 14:31:47
Subject: Re: Help with tracking!
Previous:From: Glus XofDate: 2010-04-20 13:50:35
Subject: Specific Database Vars

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group