]> git.lyx.org Git - features.git/commit
Prevent iconv exception in previews (#13042)
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 16 Mar 2024 03:52:51 +0000 (04:52 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 16 Mar 2024 03:52:51 +0000 (04:52 +0100)
commitb3fe9cb7049daaacbcf357ba5e4ece479f7b1be4
tree629c3eb19b61e92db384a1f3d3ea3e1f00c74bd5
parent0fb7650786e9574d978015b8986686e10b2330e8
Prevent iconv exception in previews (#13042)

The preview loader assumes all content is in the main document encoding.

As soon as content was not encodable, LyX crashed. We now check for that
and if non-encodable glyphs are found, we do not produce a preview snippet
and warn.

Ideally, the preview loader should be made aware of encoding changes, or
we should generally use utf8 for previews.
src/graphics/PreviewLoader.cpp