This project has moved. For the latest updates, please go here.

UTF-16 Encoding

Topics: Developer Forum, User Forum
Sep 14, 2007 at 4:04 PM
Hi Guys,

Really great work on the RSSToolkit. When using a custom .ashx HttpHandler, I notice that the output is always UTF-16 (and the version is declared as '<?xml version="1.0" encoding="utf-16"?>'). I tried configuring my web.config with '<globalization fileEncoding="utf-8" responseEncoding="utf-8" />' but this didn't affect the output. A quick glance through the RSSToolkit source and I can't find anything that is explicitly setting the output to utf-16, so I'm at a bit of a loss.

Does anyone have any pointers?

Cheers,
Austin.
Dec 20, 2007 at 1:34 PM
Edited Dec 20, 2007 at 1:45 PM
Hello everyone,

Does somebody have find the workaround for this problem ?

Thanks
Ben
Jan 5, 2008 at 5:50 PM
Same problem here... It would be nice to be able to set the encoding progammatically. Any help from the creators?

Thanks,
Scott
Jan 5, 2008 at 9:50 PM
This isn't very elegant but I just did this to replace the encoding so it will work in an IE response.
Dim outputXml As String = myRssDoc.ToXml(DocumentType.Rss)

'Replace UTF-16
Dim utfFormat As String = outputXml.Replace("utf-16", "utf-8")

' Publish as RSS
Response.ContentType = "application/rss+xml"
Response.Write(utfFormat)

An encoding property would be nice ;D
Have Fun!
Scott


aussi wrote:
Hi Guys,

Really great work on the RSSToolkit. When using a custom .ashx HttpHandler, I notice that the output is always UTF-16 (and the version is declared as '<?xml version="1.0" encoding="utf-16"?>'). I tried configuring my web.config with '<globalization fileEncoding="utf-8" responseEncoding="utf-8" />' but this didn't affect the output. A quick glance through the RSSToolkit source and I can't find anything that is explicitly setting the output to utf-16, so I'm at a bit of a loss.

Does anyone have any pointers?

Cheers,
Austin.