Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

Help; encoding is a nightmare!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad Wood - 17 Mar 2005 02:13 GMT
I am testing a web service that returns an XML doc as a string.  I went
through troubles when developing it whereby the saved output of the
service would not display in Internet Explorer due to encoding confusion.
I finally settled on setting responseEncoding in my web.config file to
"utf-16" and saving the output of the service encoded as "Unicode"
(using Textpad where the options are "utf-8" and "Unicode") and
everything was fine.  This seemed to make sense since the encoding of a
StringWriter that writes the string is "Unicode".

After deploying the service to another machine, I.E. will no longer open
the output.  If I manually change the encoding attribute of the XML doc
to "utf-8" and save it encoded that way, I.E. likes it.  However, the
StringWriter encoding property is read-only so I can't change it from
"Unicode", and changing my responseEncoding Web.Config setting has no
effect.
Brad Wood - 17 Mar 2005 02:21 GMT
Hit the wrong keys and sent last post before I was done.

Anyway, my question is: if the StringWriter's encoding is "Unicode", and
I'm saving the output encoded as "Unicode" and the first line of the XML
doc is:
<?xml version="1.0" encoding="utf-16"?>
Why does I.E. think the encoding is messed up?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.