PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Re: Saving a xml file as UTF-8

Reply

Re: Saving a xml file as UTF-8

 
Thread Tools Rate Thread
Old 10-01-2007, 09:24 PM   #1
Jon Skeet [C# MVP]
Guest
 
Posts: n/a
Default Re: Saving a xml file as UTF-8


Roy <Roy@discussions.microsoft.com> wrote:
> Is there any way to Save an existing xml file as UTF-8 via program. The
> header of xml file specifies UTF-8, but it has been saved as ANSI not UTF-8.
> Any suggestions would be appreciated.


Sounds like the fact that it's XML is irrelevant - read the file in
using ANSI, write it out using UTF-8. See
http://www.pobox.com/~skeet/csharp/unicode.html for sample conversion
code. (You just need to change the encodings involved.)

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off