When syntax_load() reads a syntax file, it can guess the correct encoding
using encoding_guess_whole_file(). When it does that, it's supposed to
use the guessed encoding to recode the file data into UTF-8. In fact, it
was using the original (NULL or "") encoding, which didn't work out well.
This commit makes it use the guessed encoding.
Bug #41975.
Reported by Mindaugas.
sw->encoding = g_strdup (encoding);
}
- text_utf8 = recode_substring_pool ("UTF-8", encoding,
+ text_utf8 = recode_substring_pool ("UTF-8", sw->encoding,
ss_buffer (text_locale, len_locale),
NULL).string;
free (text_locale);