From ec79978dd059d51c8c28efae949d115987588011 Mon Sep 17 00:00:00 2001
From: Noah Misch <noah@leadboat.com>
Date: Fri, 14 Aug 2015 20:23:13 -0400
Subject: [PATCH] Encoding PG_UHC is code page 949.

This fixes presentation of non-ASCII messages to the Windows event log
and console in rare cases involving Korean locale.  Processes like the
postmaster and checkpointer, but not processes attached to databases,
were affected.  Back-patch to 9.4, where MessageEncoding was introduced.
The problem exists in all supported versions, but this change has no
effect in the absence of the code recognizing PG_UHC MessageEncoding.

Noticed while investigating bug #13427 from Dmitri Bourlatchkov.
---
 src/backend/utils/mb/encnames.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/utils/mb/encnames.c b/src/backend/utils/mb/encnames.c
index 94334c47b62..11099b844f4 100644
--- a/src/backend/utils/mb/encnames.c
+++ b/src/backend/utils/mb/encnames.c
@@ -344,7 +344,7 @@ const pg_enc2name pg_enc2name_tbl[] =
 	DEF_ENC2NAME(SJIS, 932),
 	DEF_ENC2NAME(BIG5, 950),
 	DEF_ENC2NAME(GBK, 936),
-	DEF_ENC2NAME(UHC, 0),
+	DEF_ENC2NAME(UHC, 949),
 	DEF_ENC2NAME(GB18030, 54936),
 	DEF_ENC2NAME(JOHAB, 0),
 	DEF_ENC2NAME(SHIFT_JIS_2004, 932)
-- 
GitLab