1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

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
This commit is contained in:
Bruce Momjian
2006-12-04 22:23:40 +00:00
parent 6cd9a58480
commit 1e22e60505
4 changed files with 7 additions and 7 deletions

View File

@@ -10,7 +10,7 @@
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.44 2006/11/08 20:12:05 tgl Exp $
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.45 2006/12/04 22:23:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -254,7 +254,7 @@ pgsymlink(const char *oldpath, const char *newpath)
errno = 0;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
(LPSTR) & msg, 0, NULL);
#ifndef FRONTEND
ereport(ERROR,