Re: Xml Encoding Problem!!!
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 06/23/04
- Next message: TT \(Tom Tempelaere\): "Re: Djikstra counting semaphore in c# for your review"
- Previous message: R.A.: "Helpprovider not launching help from shortcut"
- In reply to: Vai2000: "Xml Encoding Problem!!!"
- Next in thread: Vai2000: "Re: Xml Encoding Problem!!!"
- Reply: Vai2000: "Re: Xml Encoding Problem!!!"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 21:15:48 +0100
Vai2000 <nospam@microsoft.com> wrote:
> Hi All, I have an xml document which gets generated out of a process with
> utf-16 type of encoding. I am writing this to a file. How can I convert it
> to utf-8 since IE won't open the Document.
> Tried using Encoding.Unicode,Encoding.Utf8 flags in the StreamWriter but no
> luck!!!
>
> // this is the code I am using to write out
> StreamWriter sw=new StreamWriter(fileOut);
> sw.Write(content,Encoding.Unicode);
> //sw.Write(content,Encoding.Utf8);
> sw.Close();
Not sure what you're doing in that code - the StreamWriter should have
a UTF-8 encoding by default.
Could you post a short but complete program which demonstrates the
problem?
See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: TT \(Tom Tempelaere\): "Re: Djikstra counting semaphore in c# for your review"
- Previous message: R.A.: "Helpprovider not launching help from shortcut"
- In reply to: Vai2000: "Xml Encoding Problem!!!"
- Next in thread: Vai2000: "Re: Xml Encoding Problem!!!"
- Reply: Vai2000: "Re: Xml Encoding Problem!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|