Skip to content
Commit ac6dde37 authored by Pali Rohár's avatar Pali Rohár
Browse files

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
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