UTF8-Detection on the server?

Discussion in 'ASP General' started by Sven, Apr 16, 2004.

  1. Sven

    Sven Guest

    Hi

    I'm using a .NET client application that does requests to a VB6-server application hosted in an ASP page (the page simply created the object and calls a method passing the asp scripting context as a reference)

    When using the ASP scripting context to get a query string variable containing an UTF8-encoded german character I get the wrong string - I guess because IIS is not knowing that the string is UTF8 instead of ASCII

    The code to get the string is simply
    Result = Server.Request.Item("file"

    The same problem occures when querying a .NET site from a VB6 application - in this case the reqult is UTF8 and the VB6 application gets the UTF8 encoded €-sign without knowing that it needs to decode UTF8 to BSTR before searching for ASC(128)

    So my questions:
    1) is there a way to tell IIS inside a request that variables are UTF-8 in a way that IIS is providing the correctly decoded characters
    2) is there a way for a VB6 client to detect UTF-8 encoding and successfully decode such a response to BSTR

    Sven
    Sven, Apr 16, 2004
    #1
    1. Advertising

  2. Sven

    Mark Schupp Guest

    Will all data submitted from the client be UTF-8 encoded?
    If so, set the code page for asp to utf-8

    Session.Codepage = 65001
    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Sven" <> wrote in message
    news:...
    > Hi,
    >
    > I'm using a .NET client application that does requests to a VB6-server

    application hosted in an ASP page (the page simply created the object and
    calls a method passing the asp scripting context as a reference).
    >
    > When using the ASP scripting context to get a query string variable

    containing an UTF8-encoded german character I get the wrong string - I guess
    because IIS is not knowing that the string is UTF8 instead of ASCII.
    >
    > The code to get the string is simply
    > Result = Server.Request.Item("file")
    >
    > The same problem occures when querying a .NET site from a VB6

    application - in this case the reqult is UTF8 and the VB6 application gets
    the UTF8 encoded ?-sign without knowing that it needs to decode UTF8 to BSTR
    before searching for ASC(128).
    >
    > So my questions:
    > 1) is there a way to tell IIS inside a request that variables are UTF-8

    in a way that IIS is providing the correctly decoded characters?
    > 2) is there a way for a VB6 client to detect UTF-8 encoding and

    successfully decode such a response to BSTR?
    >
    > Sven
    Mark Schupp, Apr 16, 2004
    #2
    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. shade
    Replies:
    1
    Views:
    1,664
  2. Thomas =?ISO-8859-15?Q?G=F6tz?=

    LWP::Simple and utf8 problem

    Thomas =?ISO-8859-15?Q?G=F6tz?=, Apr 19, 2004, in forum: Perl
    Replies:
    0
    Views:
    713
    Thomas =?ISO-8859-15?Q?G=F6tz?=
    Apr 19, 2004
  3. Erik Sandblom

    open with encoding(utf8) takes forever

    Erik Sandblom, May 28, 2004, in forum: Perl
    Replies:
    0
    Views:
    542
    Erik Sandblom
    May 28, 2004
  4. Spamtrap

    UTF8 to Unicode conversion

    Spamtrap, Jul 30, 2004, in forum: Perl
    Replies:
    6
    Views:
    9,909
    Joe Smith
    Jul 31, 2004
  5. gry
    Replies:
    2
    Views:
    716
    Alf P. Steinbach
    Mar 13, 2012
Loading...

Share This Page