Continuing the improvement of the CustomTextMessageEncoder (see this and this ), this time I'll use the XmlDictionaryWriter instead of the XmlTextWriter whenever the character encoding is utf-8 , utf-16 or Unicode . To achieve this, all that's needed is to look into the character set part of...