Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Heikki Linnakangas
On 20.04.2011 06:48, Hiroshi Inoue wrote: I can find no concrete reference to problems about locale names containing dots. Is the following an example? Yes. In my environment (Windows Vista using VC8) setlocale(LC_, Chinese (Traditional)_MCO.950); works and setlocale(LC_,

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Tom Lane
Hiroshi Inoue in...@tpf.co.jp writes: In my environment (Windows Vista using VC8) setlocale(LC_, Chinese (Traditional)_MCO.950); works and setlocale(LC_, NULL); returns Chinese (Traditional)_Macao S.A.R..950 but setlocale(LC_, Chinese (Traditional)_Macao S.A.R..950);

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Hiroshi Inoue
(2011/04/20 15:30), Heikki Linnakangas wrote: On 20.04.2011 06:48, Hiroshi Inoue wrote: I can find no concrete reference to problems about locale names containing dots. Is the following an example? Yes. In my environment (Windows Vista using VC8) setlocale(LC_, Chinese

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Tom Lane
Hiroshi Inoue in...@tpf.co.jp writes: I see another issue for the behavior. For example, the following code in src/backend/utis/adt/pg_locale.c won't work as expected in case the current locale is Hong Kong, Macao or UAE because the last setlocale() in the code would fail. I can find such

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Hiroshi Inoue
(2011/04/20 22:08), Tom Lane wrote: Hiroshi Inouein...@tpf.co.jp writes: In my environment (Windows Vista using VC8) setlocale(LC_, Chinese (Traditional)_MCO.950); works and setlocale(LC_, NULL); returns Chinese (Traditional)_Macao S.A.R..950 but setlocale(LC_,

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-20 Thread Hiroshi Inoue
(2011/04/20 15:30), Heikki Linnakangas wrote: On 20.04.2011 06:48, Hiroshi Inoue wrote: I can find no concrete reference to problems about locale names containing dots. Is the following an example? Yes. In my environment (Windows Vista using VC8) setlocale(LC_, Chinese

[HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-19 Thread Hiroshi Inoue
(2011/04/16 2:56), Heikki Linnakangas wrote: setlocale() on Windows doesn't work correctly if the locale name contains apostrophes or dots. As for apostrophes, isn't the cause that initdb loses the single quote of locale? ([BUGS] BUG #5818: initdb lose the single quote of locale) As the bug

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-19 Thread Tom Lane
Hiroshi Inoue in...@tpf.co.jp writes: (2011/04/16 2:56), Heikki Linnakangas wrote: setlocale() on Windows doesn't work correctly if the locale name contains apostrophes or dots. As for apostrophes, isn't the cause that initdb loses the single quote of locale? ([BUGS] BUG #5818: initdb lose

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-19 Thread Hiroshi Inoue
(2011/04/20 9:22), Tom Lane wrote: Hiroshi Inouein...@tpf.co.jp writes: (2011/04/16 2:56), Heikki Linnakangas wrote: setlocale() on Windows doesn't work correctly if the locale name contains apostrophes or dots. As for apostrophes, isn't the cause that initdb loses the single quote of

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-19 Thread Andrew Dunstan
On 04/19/2011 09:42 PM, Hiroshi Inoue wrote: bootstrap_template1() in initdb runs the BKI script in bootstrap mode to create template1. Some symbols (LC_COLLATE, LC_CTYPE in pg_database etc) in the BKI script are substituted by actual values using replace_token(). Isn't it correct? ISTM

Re: [HACKERS] Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

2011-04-19 Thread Hiroshi Inoue
(2011/04/20 12:25), Andrew Dunstan wrote: On 04/19/2011 09:42 PM, Hiroshi Inoue wrote: bootstrap_template1() in initdb runs the BKI script in bootstrap mode to create template1. Some symbols (LC_COLLATE, LC_CTYPE in pg_database etc) in the BKI script are substituted by actual values using