Commit 575ff413 authored by Cosimo Cecchi's avatar Cosimo Cecchi
Browse files

window: actually insert the converted data into the buffer

We were converting the data in case it was not UTF-8, but failed to put
it into the buffer correctly.
parent 4ef5065b
......@@ -1000,7 +1000,8 @@ read_new_lines_cb (LogviewLog *log,
if (!g_utf8_validate (lines[i], len, NULL)) {
converted = g_locale_to_utf8 (lines[i], (gssize) len, NULL, &len, NULL);
gtk_text_buffer_insert (buffer, &iter, lines[i], len);
gtk_text_buffer_insert (buffer, &iter, converted, len);
g_free (converted);
} else {
gtk_text_buffer_insert (buffer, &iter, lines[i], strlen (lines[i]));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment