aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/input.c')
-rw-r--r--src/bin/psql/input.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index 26fe7659e2a..b220ed89418 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -3,13 +3,17 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.25 2003/07/25 19:27:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.26 2003/07/27 03:32:26 momjian Exp $
*/
#include "postgres_fe.h"
#include "input.h"
#include <errno.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include "pqexpbuffer.h"
#include "settings.h"
#include "tab-complete.h"
@@ -42,6 +46,15 @@ static void finishInput(int, void *);
#define PSQLHISTORY ".psql_history"
+#ifdef WIN32
+ /*
+ * translate DOS console character set into ANSI, needed e.g. for
+ * German umlauts
+ */
+ if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
+ OemToChar(s, s);
+#endif
+
#ifdef USE_READLINE
static enum histcontrol
GetHistControlConfig(void)