summaryrefslogtreecommitdiffstats
path: root/openvpn.c
diff options
context:
space:
mode:
authorHeiko Hund <heiko.hund@sophos.com>2011-11-23 19:08:34 +0100
committerDavid Sommerseth <davids@redhat.com>2012-02-04 12:49:03 +0100
commit6ba68180b89e0290855f70832243fc9b4370e4d2 (patch)
tree008de7e49567cd78e92d674de025e299b9971316 /openvpn.c
parent8fc83a2d6cfa44032f38e13fc2f7dbc096f584d9 (diff)
downloadopenvpn-6ba68180b89e0290855f70832243fc9b4370e4d2.tar.gz
openvpn-6ba68180b89e0290855f70832243fc9b4370e4d2.tar.xz
openvpn-6ba68180b89e0290855f70832243fc9b4370e4d2.zip
Windows UTF-8 input/output
This patch makes openvpn read unicode from the console and convert the input to UTF-8. And then display UTF-8 output to the console correctly. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'openvpn.c')
-rw-r--r--openvpn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openvpn.c b/openvpn.c
index b4d6fd2..f5f2bce 100644
--- a/openvpn.c
+++ b/openvpn.c
@@ -131,6 +131,10 @@ main (int argc, char *argv[])
return 1;
#endif
+#ifdef TARGET_WIN32
+ SetConsoleOutputCP (CP_UTF8);
+#endif
+
CLEAR (c);
/* signify first time for components which can