Skip to content

Commit 9b11b54

Browse files
committed
Set codepage in console for windows to UTF-8 (bug #43099)
* QWinTerminalImpl.cpp: Set codepage to 65001 (UTF-8).
1 parent 45f9645 commit 9b11b54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ QConsolePrivate::QConsolePrivate (QWinTerminalImpl* parent, const QString& cmd)
383383
l->addWidget (m_horizontalScrollBar, 1, 0);
384384
l->addWidget (m_verticalScrollBar, 0, 1);
385385

386+
SetConsoleCP (65001);
387+
SetConsoleOutputCP (65001);
388+
386389
// Choose 15 (0xF) as index into the Windows console color map for the
387390
// background and 0 (0x0) as the index for the foreground. This
388391
// selection corresponds to the indices used in the foregroundColor,

0 commit comments

Comments
 (0)