iso8859-1 and utf-8

Discussion in 'ASP .Net Web Services' started by polo, Dec 31, 2003.

  1. polo

    polo Guest

    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
     
    polo, Dec 31, 2003
    #1
    1. Advertising

  2. polo

    Jan Tielens Guest

    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" <> schreef in bericht
    news:096801c3cfbc$a7bf28b0$...
    > 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
    >
     
    Jan Tielens, Dec 31, 2003
    #2
    1. Advertising

  3. polo

    Guest Guest

    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" <> schreef in

    bericht
    >news:096801c3cfbc$a7bf28b0$...
    >> 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
    >>

    >
    >
    >.
    >
     
    Guest, Jan 2, 2004
    #3
  4. polo

    Jan Tielens Guest

    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
    <> schreef in bericht
    news:071401c3d143$f89bf410$...
    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" <> schreef in

    bericht
    >news:096801c3cfbc$a7bf28b0$...
    >> 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
    >>

    >
    >
    >.
    >
     
    Jan Tielens, Jan 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. moonhkt

    change ISO8859-1 to GB2312

    moonhkt, May 19, 2010, in forum: Java
    Replies:
    17
    Views:
    1,727
    RedGrittyBrick
    May 26, 2010
  2. jmfauth
    Replies:
    4
    Views:
    345
    jmfauth
    Oct 13, 2010
  3. Grzegorz ¦liwiñski
    Replies:
    2
    Views:
    1,024
    Grzegorz ¦liwiñski
    Jan 19, 2011
  4. Andreas Schwarz

    UTF-8 -> iso8859-15

    Andreas Schwarz, Jul 25, 2003, in forum: Ruby
    Replies:
    7
    Views:
    115
  5. Hadmut Danisch

    Conversion between utf-8 and iso8859-1?

    Hadmut Danisch, Feb 13, 2004, in forum: Ruby
    Replies:
    3
    Views:
    247
    Carlos
    Feb 16, 2004
Loading...

Share This Page