changeset 22686:8c749f33ce0a stable

Set codepage in console for windows to UTF-8 (bug #43099) * QWinTerminalImpl.cpp: Set codepage to 65001 (UTF-8).
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 21 Oct 2016 12:36:22 +0200
parents f88de8f27259
children 96817eafc799
files libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp	Sun Oct 23 23:16:02 2016 +0200
+++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp	Fri Oct 21 12:36:22 2016 +0200
@@ -383,6 +383,9 @@
   l->addWidget (m_horizontalScrollBar, 1, 0);
   l->addWidget (m_verticalScrollBar, 0, 1);
 
+  SetConsoleCP (65001);
+  SetConsoleOutputCP (65001);
+
   // Choose 15 (0xF) as index into the Windows console color map for the
   // background and 0 (0x0) as the index for the foreground.  This
   // selection corresponds to the indices used in the foregroundColor,