Re: Getting around .Net Strings being UTF-16 encoded only

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Mike Murray wrote:

What I want to do is create the same file but from vb.NET, therefore
that is why i'm using the XmlTextWriter code. Which makes sense to me,
I just want to clarify that my code is correct, and i'm going about
this the right way.

Yep, that's the right way. Just rely on .NET and XmlTextWriter to cope with encoding:


XmlTextWriter w = new XmlTextWriter("foo.xml", Encoding.UTF8);

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.XmlLab.Net | http://www.XLinq.Net | http://blog.tkachenko.com
.