Hello
Using Visual Studio, I created a WebService with the default
"HelloWorld" method. It all works fine but when I try to get the
method to return a French string, all the accented characters are
removed. ie. I changed the webservice implementation to:
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello décès"
End Function
and when I invoke it on my server I get
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">Hello dcs</string>
Can somebody tell me what is going wrong?
BTW, it works fine on my development machine but not on the production
server.
Paul
ukfreethinker@yahoo.com - 29 Sep 2006 11:49 GMT
> Hello
>
[quoted text clipped - 14 lines]
>
> Can somebody tell me what is going wrong?
OK, if anyone is interested, the answer is here:
http://www.aspnetresources.com/blog/unicode_in_vsnet.aspx
Visual Studio does not save your files as utf-8 by default and there
seems to be no way of changing the default. You have to manually save
with encoding every time you save an .asmx or .vb file. Surely this
is a bug or an oversight.
I still don't understand why it works on my local development machine
though.
Paul