From 261ceaf969326957efc7be2644e8ba5fbcbdf68e Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 14 Feb 2014 18:56:38 -0800 Subject: [PATCH] Pass nullptr for the codepage for ass_read_memory Passing a codepage makes libass convert to UTF-8 even if it's already UTF-8. --- aegisub/src/subtitles_provider_libass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/subtitles_provider_libass.cpp b/aegisub/src/subtitles_provider_libass.cpp index 1347b50fe..8c7152990 100644 --- a/aegisub/src/subtitles_provider_libass.cpp +++ b/aegisub/src/subtitles_provider_libass.cpp @@ -127,7 +127,7 @@ void LibassSubtitlesProvider::LoadSubtitles(AssFile *subs) { } if (ass_track) ass_free_track(ass_track); - ass_track = ass_read_memory(library, &data[0], data.size(),(char *)"UTF-8"); + ass_track = ass_read_memory(library, &data[0], data.size(), nullptr); if (!ass_track) throw "libass failed to load subtitles."; }