diff --git a/src/ass_style.cpp b/src/ass_style.cpp index 0b778b328f..ad3b9ccc93 100644 --- a/src/ass_style.cpp +++ b/src/ass_style.cpp @@ -192,6 +192,7 @@ void AssStyle::UpdateData() { void AssStyle::GetEncodings(wxArrayString &encodingStrings) { encodingStrings.Clear(); + encodingStrings.Add(wxString("-1 - ") + _("Auto-detect base direction (libass only)")); encodingStrings.Add(wxString("0 - ") + _("ANSI")); encodingStrings.Add(wxString("1 - ") + _("Default")); encodingStrings.Add(wxString("2 - ") + _("Symbol")); diff --git a/src/dialog_style_editor.cpp b/src/dialog_style_editor.cpp index 2b511c2823..d48047c71d 100644 --- a/src/dialog_style_editor.cpp +++ b/src/dialog_style_editor.cpp @@ -258,7 +258,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con break; } } - if (!found) Encoding->Select(0); + if (!found) Encoding->Select(2); // Style name sizer NameSizer->Add(StyleName, 1, wxALL, 0); @@ -474,8 +474,10 @@ void DialogStyleEditor::UpdateWorkStyle() { work->font = from_wx(FontName->GetValue()); + wxString encoding_selection = Encoding->GetValue(); + wxString encoding_num = encoding_selection.substr(0, 1) + encoding_selection.substr(1).BeforeFirst('-'); // Have to account for -1 long templ = 0; - Encoding->GetValue().BeforeFirst('-').ToLong(&templ); + encoding_num.ToLong(&templ); work->encoding = templ; work->borderstyle = OutlineType->IsChecked() ? 3 : 1;