From 239b273a16a0f770a04e22df433ef3cdceb124e5 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Mon, 7 Oct 2024 00:04:49 +0800 Subject: [PATCH] [24_19] HTML: copy as html snippet --- src/Plugins/Qt/qt_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Plugins/Qt/qt_gui.cpp b/src/Plugins/Qt/qt_gui.cpp index 66f3c01a2d..ed4348dc33 100644 --- a/src/Plugins/Qt/qt_gui.cpp +++ b/src/Plugins/Qt/qt_gui.cpp @@ -383,7 +383,9 @@ qt_gui_rep::set_selection (string key, tree t, string s, string sv, string sh, md->setText (QString::fromLatin1 (selection, -1)); } } - else md->setText (QString::fromLatin1 (selection, -1)); + else { + md->setText (QString::fromUtf8 (selection, -1)); + } cb->setMimeData (md, mode); // according to the docs, ownership of mimedata is transferred to clipboard // so no memory leak here