Groups | Blog | Home
all groups > dotnet xml > february 2005 >

dotnet xml : Change encoding from UTF-8 to ISO-8859-1


JuanDG
2/18/2005 8:39:08 AM
Hi,

I have a .Net Web Service and the encoding of the SOAP Messages is always
UTF-8, and I need to change the web service so that it encodes with
ISO-8859-1 because it’s the only encoding my web services client supports.

I've updated my web.config & machine.config Globalization requestEncoding
and requestResponse settings to reflect this but whenever I test this
Through the default asmx page the XML header always includes the UTF-8
property, similarly when we test it using one of the web service clients it
also returns UTF-8 encoded SOAP Messages.

Is there anybody out there that can please help me with this????????

Thanks in advance,

Cheers

--

Juan David Gomez A.
Microsoft Certified Professional
Analista de Desarrollo - PSL S.A.
Web and Wireless Banking
JuanDG
3/3/2005 12:41:04 PM
Thanks for your answer.

The problem is that I need to change the encoding of a dynamically generated
(by a Web Service) SOAP Message, so I can't use notepad for this.

I also tried changing the parameters in the web.config, but it didn't work,
later an Employee at Microsoft technical support told me this features in the
web.config only work for Web Forms and not for Web services.

[quoted text, click to view]
Niklas E
3/3/2005 8:39:12 PM
Try to change the fileEncoding in web.config instead. It helped us when we
didn't get åäöÅÄÖ and other characters in CMS 2002. You can also save the
file as Western(iso-8859-1) instead of Unicode(UTF-8). I think Notepad is
able to do this, else try EmEditor or other good Text-editors.

fileEncoding="iso-8859-1"

Best regards
Niklas Engfelt


[quoted text, click to view]

AddThis Social Bookmark Button