If the charset variable is not being used, its value becomes stale, and
copying it to a pane attr causes corruption. This results in non-utf8
being passed to pango_layout_set_text()
Signed-off-by: NeilBrown <neil@brown.name>
- [ ] auto-sign emails..
- [ ] message must be tagged "replied" when a reply is sent.
- [ ] if a shell command produces no output, message should be shown
-- [ ] pango_layout_set_text() is sometimes given invalid UTF-8
+- [X] pango_layout_set_text() is sometimes given invalid UTF-8
- [ ] be sure to wait for xdg-open etc.
- [ ] things slow down after lots of edits. Maybe track
number of chunk, marks, undos etc and display them somewhere
}
if (xfer && xlen == 4 &&
strncasecmp(xfer, "8bit", 6) == 0)
- need_charset = 2; // ony if not utf-8
+ need_charset = 2; // only if not utf-8
}
if (type && need_charset &&
(charset = get_822_attr(type, "charset")) != NULL &&
hx = call_ret(pane, "attach-charset-windows-1251", h);
if (hx)
h = hx;
- }
+ } else
+ charset = NULL;
if (type && (fname = get_822_attr(type, "name")))
fname = strsave(h, fname);
if (disp && !fname &&