pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCHES] Solve a problem of LC_TIME of windows.
Date: Wed, 26 Nov 2008 18:29:43 +0900
Message-ID: <492D1707.3060403@tpf.co.jp> (raw)
In-Reply-To: <20081126174021.EFC6.52131E4D@oss.ntt.co.jp>
References: <20081126171019.EFC3.52131E4D@oss.ntt.co.jp>
	<492D08BF.6090601@tpf.co.jp>
	<20081126174021.EFC6.52131E4D@oss.ntt.co.jp>

ITAGAKI Takahiro wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> wrote:
> 
>> Please call setlocale(LC_CTYPE/LC_ALL, "") first.
> 
> Ah, it works! But setlocale(*, "") means that we always use platform
> locale (Japanese and SJIS in Japan).

Maybe you can call setlocale(LC_CTYPE, ".20932") instead and you
  would get CP20932 encoding. The encoding of LC_TIME or LC_MESSAGES
has little meaning.

 > It could be different from server
> encoding and locale in postgres. Is it acceptable? I think we need to
> set LC_CTYPE and other LC_* independently...

Seems LC_CTYPE and LC_TIME should be convertible even though we use
wcsftime (which internally calls strftime?).
As for gettext(LC_MESSAGES) on Windows we can set LC_CTYPE independently
  because it is unrelated to the output encoding. In addition we can call
bind_textdomain_codeset to change the output encoding.
I'm providing a patch to adjust the output encoding of Windows
gettext.

regards,
Hiroshi Inoue






view thread (45+ messages)  latest in thread

Message-ID: <492D1707.3060403@tpf.co.jp>
Permalink:  ../492D1707.3060403@tpf.co.jp/
Also on:    postgresql.org/message-id/492D1707.3060403@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: inoue@tpf.co.jp, itagaki.takahiro@oss.ntt.co.jp, z-saito@guitar.ocn.ne.jp, pgsql-hackers@postgresql.org
  Subject: Re: [PATCHES] Solve a problem of LC_TIME of windows.
  In-Reply-To: <492D1707.3060403@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox