Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2019-02-22 16:55:00 +0300
committerVojtech Kral <vojtech@kral.hk>2019-02-22 18:11:14 +0300
commit4f63f65d3d547c284bb3e5c6c7767276097f1b55 (patch)
tree350f42a69099cb5ca563b50fc568d25205af585c /src/slic3r/GUI/FirmwareDialog.cpp
parent91ccdb0a4d49cfb3ca046a6fb92c35eda4686446 (diff)
Firmware Updater: Handle messages in non-UTF-8 encoding on Windows
Diffstat (limited to 'src/slic3r/GUI/FirmwareDialog.cpp')
-rw-r--r--src/slic3r/GUI/FirmwareDialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slic3r/GUI/FirmwareDialog.cpp b/src/slic3r/GUI/FirmwareDialog.cpp
index 4ca2eb90c..20ea0c16d 100644
--- a/src/slic3r/GUI/FirmwareDialog.cpp
+++ b/src/slic3r/GUI/FirmwareDialog.cpp
@@ -588,6 +588,13 @@ void FirmwareDialog::priv::perform_upload()
auto evt = new wxCommandEvent(EVT_AVRDUDE, q->GetId());
auto wxmsg = wxString::FromUTF8(msg);
+#ifdef WIN32
+ // The string might be in local encoding
+ if (wxmsg.IsEmpty() && *msg != '\0') {
+ wxmsg = wxString(msg);
+ }
+#endif
+
evt->SetExtraLong(AE_MESSAGE);
evt->SetString(std::move(wxmsg));
wxQueueEvent(q, evt);