From 1e22e605050eded6ed49f049678782dba9e864cf Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 4 Dec 2006 22:23:40 +0000 Subject: Patch of Win32 Encoding problem for server messages using FormatMessage() (This should have been in 8.2.0, patched to 8.2.X and HEAD): I think this problem to be complex.... http://archives.postgresql.org/pgsql-hackers/2006-11/msg00042.php FormatMessage of windows cannot consider the encoding of the database. However, I should try the solution now. It is necessary to clear the problem. Multi character-code exists together in message and log. It doesn't consider the data base encoding that the user intended.... The user in multi-byte country can try this. http://inet.winpg.jp/~saito/pg_bug/MessageCheck.c That is, it is likely to become it in this manner.(Japanese) http://inet.winpg.jp/~saito/pg_bug/FormatMessage998.png Hiroshi Saito --- src/backend/port/win32/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/port/win32/socket.c') diff --git a/src/backend/port/win32/socket.c b/src/backend/port/win32/socket.c index 6489c64daee..0dc62a48119 100644 --- a/src/backend/port/win32/socket.c +++ b/src/backend/port/win32/socket.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.14 2006/10/13 13:59:47 teodor Exp $ + * $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.15 2006/12/04 22:23:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -582,7 +582,7 @@ pgwin32_socket_strerror(int err) if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, handleDLL, err, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), wserrbuf, sizeof(wserrbuf) - 1, NULL) == 0) -- cgit v1.2.3