Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > iso8859-1 and utf-8

Reply
Thread Tools

iso8859-1 and utf-8

 
 
polo
Guest
Posts: n/a
 
      12-31-2003
Hello,

We have a .Net Web Service and we want to use iso-8859-1
instead of utf-8 in the response. How can we do that?

thanks for help

Polo

 
Reply With Quote
 
 
 
 
Jan Tielens
Guest
Posts: n/a
 
      12-31-2003
You can set the encoding in the web.config:
<globalization

requestEncoding="utf-8"

responseEncoding="utf-8"

/>


--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"polo" <(E-Mail Removed)> schreef in bericht
news:096801c3cfbc$a7bf28b0$(E-Mail Removed)...
> Hello,
>
> We have a .Net Web Service and we want to use iso-8859-1
> instead of utf-8 in the response. How can we do that?
>
> thanks for help
>
> Polo
>



 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      01-02-2004
Thanks for help jan
but this as no effect
in my tcp trace
- http header is always ...utf-8
- xml prolog of the response is always ...utf-8

The client is a soap one!
Another idea?

Here is the service:
====================
Imports System.Web.Services
<System.Web.Services.WebService
(Namespace:="http://tempuri.org/pharmacies/Service1")> _
....
Public Class Service1
Inherits System.Web.Services.WebService
<WebMethod(), Protocols.SoapRpcMethod("PharmList")> _
Public Function PharmList() As String
Dim str As String
str = ""
Return str
End Function
End Class

Here is the web.config:
=======================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="false" requestLimit="10"
pageOutput="false" traceMode="SortByTime"
localOnly="true" />
<globalization requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1" fileEncoding="iso-8859-1"/>
</system.web>
</configuration>


>-----Original Message-----
>You can set the encoding in the web.config:
><globalization
>
>requestEncoding="utf-8"
>
>responseEncoding="utf-8"
>
>/>
>
>
>--
>Greetz,
>Jan
>__________________________________
>Read my weblog: http://weblogs.asp.net/jan
>"polo" <(E-Mail Removed)> schreef in

bericht
>news:096801c3cfbc$a7bf28b0$(E-Mail Removed)...
>> Hello,
>>
>> We have a .Net Web Service and we want to use iso-8859-

1
>> instead of utf-8 in the response. How can we do that?
>>
>> thanks for help
>>
>> Polo
>>

>
>
>.
>

 
Reply With Quote
 
Jan Tielens
Guest
Posts: n/a
 
      01-02-2004
Mmmm, then I've got some bad news for you... I found this in a newsgroup:

Hi Paul,

Right now the responseencoding and requestencoding is not supported from
Web service.

Luke
Microsoft Online Support

So I think it won't be possible.

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
<(E-Mail Removed)> schreef in bericht
news:071401c3d143$f89bf410$(E-Mail Removed)...
Thanks for help jan
but this as no effect
in my tcp trace
- http header is always ...utf-8
- xml prolog of the response is always ...utf-8

The client is a soap one!
Another idea?

Here is the service:
====================
Imports System.Web.Services
<System.Web.Services.WebService
(Namespace:="http://tempuri.org/pharmacies/Service1")> _
....
Public Class Service1
Inherits System.Web.Services.WebService
<WebMethod(), Protocols.SoapRpcMethod("PharmList")> _
Public Function PharmList() As String
Dim str As String
str = ""
Return str
End Function
End Class

Here is the web.config:
=======================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="false" requestLimit="10"
pageOutput="false" traceMode="SortByTime"
localOnly="true" />
<globalization requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1" fileEncoding="iso-8859-1"/>
</system.web>
</configuration>


>-----Original Message-----
>You can set the encoding in the web.config:
><globalization
>
>requestEncoding="utf-8"
>
>responseEncoding="utf-8"
>
>/>
>
>
>--
>Greetz,
>Jan
>__________________________________
>Read my weblog: http://weblogs.asp.net/jan
>"polo" <(E-Mail Removed)> schreef in

bericht
>news:096801c3cfbc$a7bf28b0$(E-Mail Removed)...
>> Hello,
>>
>> We have a .Net Web Service and we want to use iso-8859-

1
>> instead of utf-8 in the response. How can we do that?
>>
>> thanks for help
>>
>> Polo
>>

>
>
>.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments