history: Fix storing messages with Unicode chars above 0xFFFF
QtXML internally encode per one 16bit character, so surrogate pairs are encoded alone. So for encoding XML we need to use UTF-16 codec. For portability convert UTF-16 surrogate pairs into XML entities. XML history file stored on disk is encoded in UTF-8 codec for encoding/decoding is properly set by this patch. Before this patch low surrogate of UTF-16 was converted to XML entity and alone high surrogate dropped (as alone it was invalid). This lead to damaging of message.
parent
7be3e3aa
Please register or sign in to comment