Created attachment 2222 [details] check if string is valid UTF8 before collating This was initially mentioned in the comments in 4460 (Unable to build installer for Windows because syntax error in `packages.current', line 13); I'm filing it as its own bug. The report was that Claws crashes when sorting by subject. The reporter couldn't narrow it down a specific email, but did produce a minidump of the crash. The dump wasn't fully intact, but it looked like there was a call to g_utf8_collate() a bit higher in the stack before the crash. I couldn't reproduce the crash myself, but the attached patch fixed the issue for the reporter. GLib expects valid UTF8 strings for g_utf8_collate(), so call g_utf8_validate() on the message subjects before trying to collate them.