PhoenixmlDb.Core

Utf8StringWriter

A that reports its encoding as UTF-8.

#Utf8StringWriter

Namespace: PhoenixmlDb.Xdm.Parsing.XmlSerializer

A that reports its encoding as UTF-8.

When writes to a (or ), it reads the declared encoding from — which is always UTF-16 for .NET strings, regardless of the property. Overriding here makes the XML declaration say encoding="utf-8", which is the correct declared encoding for content consumed as a .NET and later saved / transmitted as UTF-8 bytes.