From 70d73ea798e6cc8f30461874cbb9763d1fc37f82 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sun, 26 Jul 2026 23:19:50 -0400 Subject: [PATCH] fix(vst): replace non-ASCII em-dash/ellipsis in editor string literals with ASCII equivalents to fix mojibake on ANSI DrawTextA path --- src/vst/reasampler_editor.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vst/reasampler_editor.cpp b/src/vst/reasampler_editor.cpp index 7ae8fa9..24a4912 100644 --- a/src/vst/reasampler_editor.cpp +++ b/src/vst/reasampler_editor.cpp @@ -72,6 +72,7 @@ const LICE_pixel kColZoneBarSel = LICE_RGBA(120, 200, 160, 255); const COLORREF kRgbText = RGB(210, 230, 220); const COLORREF kRgbDim = RGB(140, 150, 146); +// ANSI path -- string literals must stay ASCII until the Phase L type kit lands. void drawText(LICE_IBitmap* bmp, const Rect& r, const char* s, COLORREF col, UINT fmt = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX) { HDC dc = bmp->getDC(); @@ -513,7 +514,7 @@ void ReaSamplerEditor::paintEmptyState(LICE_IBitmap* bmp, const Rect& area) { // Shown when no card is drawn (nothing to pick): distinguish a genuinely empty bank from // a bank filter that hides everything. Either way it is the "pick a capture" empty state. const char* msg = samples_.empty() - ? "No captures in this project yet — capture audio into the bank to play it here." + ? "No captures in this project yet - capture audio into the bank to play it here." : "No captures in this bank filter. Choose another bank tab above."; drawTextCentered(bmp, area, msg, kRgbDim); } @@ -572,7 +573,7 @@ void ReaSamplerEditor::paintBrowser(LICE_IBitmap* bmp, int w, int h) { std::string badge; if (s.rootNote) badge = "root " + noteLabel(*s.rootNote); else if (s.key) badge = *s.key; - else badge = "root —"; + else badge = "root -"; drawText(bmp, badgeR, badge.c_str(), kRgbDim); } @@ -659,7 +660,7 @@ void ReaSamplerEditor::paintSetup(LICE_IBitmap* bmp, const Rect& area) { alpha, 0); } } else { - drawTextCentered(bmp, waveArea, "(decoding…)", kRgbDim); + drawTextCentered(bmp, waveArea, "(decoding...)", kRgbDim); } // Keyboard strip with the root marker. @@ -726,7 +727,7 @@ void ReaSamplerEditor::paintZones(LICE_IBitmap* bmp, int w, int h) { if (selectedZone_ >= 0 && selectedZone_ < static_cast(map_.zones.size())) { const PerformanceZone& z = map_.zones[static_cast(selectedZone_)]; std::string info = sampleLabel(samples_, z.sampleId) + " " + noteLabel(z.lowNote) + - " – " + noteLabel(z.highNote) + " root " + + " - " + noteLabel(z.highNote) + " root " + (z.rootOverride ? noteLabel(*z.rootOverride) + "*" : std::string("(bank)")); drawText(bmp, infoR, info.c_str(), kRgbText); } else if (map_.zones.empty()) {