diff --git a/aegisub/src/scintilla_text_ctrl.cpp b/aegisub/src/scintilla_text_ctrl.cpp index 83bb765ef..3a304554c 100644 --- a/aegisub/src/scintilla_text_ctrl.cpp +++ b/aegisub/src/scintilla_text_ctrl.cpp @@ -50,7 +50,7 @@ int ScintillaTextCtrl::GetUnicodePosition(int pos) { /// @brief Reverse unicode-compatible position int ScintillaTextCtrl::GetReverseUnicodePosition(int pos) { - wxCharBuffer buffer = GetText().utf8_str(); + wxCharBuffer buffer = GetTextRaw(); // Limit position to it if (pos > (signed)buffer.length()) pos = buffer.length(); diff --git a/aegisub/src/subs_edit_ctrl.cpp b/aegisub/src/subs_edit_ctrl.cpp index 9518564dc..345c11d92 100644 --- a/aegisub/src/subs_edit_ctrl.cpp +++ b/aegisub/src/subs_edit_ctrl.cpp @@ -281,7 +281,7 @@ void SubsTextEditCtrl::SetStyles() { void SubsTextEditCtrl::UpdateStyle() { StartStyling(0,255); - std::string text = STD_STR(GetText()); + std::string text = GetTextRaw(); if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) { SetStyling(text.size(), 0);