XML serializing with XmlWriter via StringBuilder is utf-8 while via stream is utf-16?

When you create an XmlWriter around a TextWriter the XmlWriter always uses the encoding of the underlying TextWriter . The encoding of a StringWriter is always UTF-16, since that's how . NET strings are encoded internally.

Where possible, the XmlWriter uses the encoding of the underlying stream. It it wrote UTF-8 data to a stream it knew was UTF-16, you'd end up with a mess. Writing UTF-16 data to a UTF-8 stream also causes problems, especially for environments that use null terminated strings (like C/C++).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions