Am Montag, 10. Dezember 2007 schrieb Hiroshi Saito: > Hi. > > From: "Peter Eisentraut" <[EMAIL PROTECTED]> > > > Am Montag, 10. Dezember 2007 schrieb Hiroshi Saito: > >> Hi Peter-san. > >> > >> It is this. > >> http://winpg.jp/~saito/pg83/ja.zip > > > > Sorry, we need the *po* (text) files, not the *mo* (binary) files. > > Ooops, Although it is an object for Version 8.2.5. > http://www.postgresql.jp/wg/jpugdoc/po/postgresql-8-2-5-nls-patch.gz
OK, you have PO file in EUC-JP server encoding UTF-8 client encoding SJIS When the server wants to send an error message to the client, it will convert them from the server to the client encoding. The English messages are ASCII, so this will work, because server encodings are required to be ASCII compatible. The result of the gettext calls, however, is encoded in EUC-JP, so the server will take the EUC-JP bytes and attempt to do a UTF-8 to SJIS conversion on them. This will cause a crash. What you need to do is set the locale to something compatible with the server encoding (e.g., ja_JP.utf8). Then gettext will recode its EUC-JP data to UTF-8 before it is sent to the server. More specifically, you need to set the LC_CTYPE locale category to make this happen. I understand that users in Japanese environments like to keep the LC_COLLATE setting to C, and you should still be able to do that. But without a proper LC_CTYPE setting, this will not work. (That is the explanation for Linux. Windows might be different in the details, but I suspect it has the same mechanisms.) -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org