We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c3afbd commit 82d8fafCopy full SHA for 82d8faf
loader/src/platform/windows/util.cpp
@@ -54,19 +54,19 @@ bool utils::clipboard::write(std::string const& data) {
54
std::string utils::clipboard::read() {
55
if (!OpenClipboard(nullptr)) return "";
56
57
- HANDLE hData = GetClipboardData(CF_TEXT);
+ HANDLE hData = GetClipboardData(CF_UNICODETEXT);
58
if (hData == nullptr) {
59
CloseClipboard();
60
return "";
61
}
62
63
- char* pszText = static_cast<char*>(GlobalLock(hData));
+ auto pszText = static_cast<wchar_t*>(GlobalLock(hData));
64
if (pszText == nullptr) {
65
66
67
68
69
- std::string text(pszText);
+ std::string text = string::wideToUtf8(pszText);
70
71
GlobalUnlock(hData);
72
0 commit comments