cookie codepage problem on iis 5.0

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eyal.herlin@gmail.com

    cookie codepage problem on iis 5.0

    hi,

    i set a cookie to hold a utf-8 string. either by the server or by the
    client. it doesn't matter.
    when i try to read this cookie using Request.Cookies ("my_utf8_cooki e")
    on iis 5.0 i get garbage.
    this garbage seems to be the result of treating the utf-8 data as some
    single-byte encoding.
    i have <%@ codepage="65001 "%set on the top of the page.
    this problem does not appear on iis 5.1.
    i have searched long and hard for a fix for this on news-groups and the
    web but to no avail.
    many people mention the problem but noone gives a proper fix.

    i hope someone from MS sees this post and will put an end to this
    issue.

    thanks alot in advance,
    Eyal Herlin

  • Anthony Jones

    #2
    Re: cookie codepage problem on iis 5.0


    <eyal.herlin@gm ail.comwrote in message
    news:1167755357 .856055.302550@ i12g2000cwa.goo glegroups.com.. .
    hi,
    >
    i set a cookie to hold a utf-8 string. either by the server or by the
    client. it doesn't matter.
    when i try to read this cookie using Request.Cookies ("my_utf8_cooki e")
    on iis 5.0 i get garbage.
    this garbage seems to be the result of treating the utf-8 data as some
    single-byte encoding.
    i have <%@ codepage="65001 "%set on the top of the page.
    this problem does not appear on iis 5.1.
    i have searched long and hard for a fix for this on news-groups and the
    web but to no avail.
    many people mention the problem but noone gives a proper fix.
    >
    i hope someone from MS sees this post and will put an end to this
    issue.
    Can you post the code that is managing to encode a cookie as UTF-8?
    >
    thanks alot in advance,
    Eyal Herlin
    >

    Comment

    • Mark Schupp

      #3
      Re: cookie codepage problem on iis 5.0

      Are you telling the browser to use utf-8 also (in the HTML):

      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

      (I think you can do this with response.charse t also)

      --
      --Mark Schupp


      "Anthony Jones" <Ant@yadayadaya da.comwrote in message
      news:O2x3je4LHH A.140@TK2MSFTNG P04.phx.gbl...
      >
      <eyal.herlin@gm ail.comwrote in message
      news:1167755357 .856055.302550@ i12g2000cwa.goo glegroups.com.. .
      >hi,
      >>
      >i set a cookie to hold a utf-8 string. either by the server or by the
      >client. it doesn't matter.
      >when i try to read this cookie using Request.Cookies ("my_utf8_cooki e")
      >on iis 5.0 i get garbage.
      >this garbage seems to be the result of treating the utf-8 data as some
      >single-byte encoding.
      >i have <%@ codepage="65001 "%set on the top of the page.
      >this problem does not appear on iis 5.1.
      >i have searched long and hard for a fix for this on news-groups and the
      >web but to no avail.
      >many people mention the problem but noone gives a proper fix.
      >>
      >i hope someone from MS sees this post and will put an end to this
      >issue.
      >
      Can you post the code that is managing to encode a cookie as UTF-8?
      >
      >>
      >thanks alot in advance,
      >Eyal Herlin
      >>
      >
      >

      Comment

      • Anthony Jones

        #4
        Re: cookie codepage problem on iis 5.0


        "Mark Schupp" <notvalid@email .netwrote in message
        news:eLRolIQMHH A.4384@TK2MSFTN GP03.phx.gbl...
        Are you telling the browser to use utf-8 also (in the HTML):
        >
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
        >
        (I think you can do this with response.charse t also)
        That'll impact the content but the cookie headers are outside the content.

        I'm not even sure how one would go about creating a UTF-8 encoded Cookie in
        the first place.



        Comment

        • eyal.herlin@gmail.com

          #5
          Re: cookie codepage problem on iis 5.0

          hi anthony,

          to create a utf-8 cookie on the client side u should have a utf-8 html
          page that sets the cookie through javascript.
          to create a utf-8 cookie on the server side u need to have the <%@
          codepage="65001 "%declerati on on top of your asp page.

          On Jan 4, 12:36 am, "Anthony Jones" <A...@yadayaday ada.comwrote:
          <eyal.her...@gm ail.comwrote in messagenews:116 7755357.856055. 302550@i12g2000 cwa.googlegroup s.com...
          >
          >
          >
          >
          >
          hi,
          >
          i set a cookie to hold a utf-8 string. either by the server or by the
          client. it doesn't matter.
          when i try to read this cookie using Request.Cookies ("my_utf8_cooki e")
          on iis 5.0 i get garbage.
          this garbage seems to be the result of treating the utf-8 data as some
          single-byte encoding.
          i have <%@ codepage="65001 "%set on the top of the page.
          this problem does not appear on iis 5.1.
          i have searched long and hard for a fix for this on news-groups and the
          web but to no avail.
          many people mention the problem but noone gives a proper fix.
          >
          i hope someone from MS sees this post and will put an end to this
          issue.Can you post the code that is managing to encode a cookie as UTF-8?
          >
          >
          >
          >
          >
          thanks alot in advance,
          Eyal Herlin- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -

          Comment

          • eyal.herlin@gmail.com

            #6
            Re: cookie codepage problem on iis 5.0

            hi mark,
            yes i do.
            my question has to do with how the server treats the cookie.

            On Jan 5, 9:45 pm, "Mark Schupp" <notva...@email .netwrote:
            Are you telling the browser to use utf-8 also (in the HTML):
            >
            <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
            >
            (I think you can do this with response.charse t also)
            >
            --
            --Mark Schupp
            >
            "Anthony Jones" <A...@yadayaday ada.comwrote in messagenews:O2x 3je4LHHA.140@TK 2MSFTNGP04.phx. gbl...
            >
            >
            >
            >
            >
            <eyal.her...@gm ail.comwrote in message
            news:1167755357 .856055.302550@ i12g2000cwa.goo glegroups.com.. .
            hi,
            >
            i set a cookie to hold a utf-8 string. either by the server or by the
            client. it doesn't matter.
            when i try to read this cookie using Request.Cookies ("my_utf8_cooki e")
            on iis 5.0 i get garbage.
            this garbage seems to be the result of treating the utf-8 data as some
            single-byte encoding.
            i have <%@ codepage="65001 "%set on the top of the page.
            this problem does not appear on iis 5.1.
            i have searched long and hard for a fix for this on news-groups and the
            web but to no avail.
            many people mention the problem but noone gives a proper fix.
            >
            i hope someone from MS sees this post and will put an end to this
            issue.
            >
            Can you post the code that is managing to encode a cookie as UTF-8?
            >
            thanks alot in advance,
            Eyal Herlin- Hide quoted text -- Show quoted text -

            Comment

            • Anthony Jones

              #7
              Re: cookie codepage problem on iis 5.0


              <eyal.herlin@gm ail.comwrote in message
              news:1170166576 .102914.302180@ h3g2000cwc.goog legroups.com...
              hi anthony,
              >
              to create a utf-8 cookie on the client side u should have a utf-8 html
              page that sets the cookie through javascript.
              to create a utf-8 cookie on the server side u need to have the <%@
              codepage="65001 "%declerati on on top of your asp page.
              >
              Using:-

              Response.Cookie s("test") = strContainsOutO fBandChars ??

              In my testing characters outside of ASCII are removed when the codepage is
              UTF-8.

              What server are you using?








              Comment

              • eyal.herlin@gmail.com

                #8
                Re: cookie codepage problem on iis 5.0

                the problem i am having is on iis 5.0 on win2k.
                it is my experience that Response.Cookie s("test") =
                strContainsOutO fBandChars
                works fine. i assumed that by strContainsOutO fBandChars u mean a utf-8
                string.

                On Jan 30, 5:20 pm, "Anthony Jones" <A...@yadayaday ada.comwrote:
                <eyal.her...@gm ail.comwrote in message
                >
                news:1170166576 .102914.302180@ h3g2000cwc.goog legroups.com...
                >
                hi anthony,
                >
                to create a utf-8 cookie on the client side u should have a utf-8 html
                page that sets the cookie through javascript.
                to create a utf-8 cookie on the server side u need to have the <%@
                codepage="65001 "%declerati on on top of your asp page.
                >
                Using:-
                >
                Response.Cookie s("test") = strContainsOutO fBandChars ??
                >
                In my testing characters outside of ASCII are removed when the codepage is
                UTF-8.
                >
                What server are you using?

                Comment

                • Anthony Jones

                  #9
                  Re: cookie codepage problem on iis 5.0


                  <eyal.herlin@gm ail.comwrote in message
                  news:1170189419 .987023.230130@ l53g2000cwa.goo glegroups.com.. .
                  the problem i am having is on iis 5.0 on win2k.
                  That's the platform I'm testing on also.
                  it is my experience that Response.Cookie s("test") =
                  strContainsOutO fBandChars
                  works fine. i assumed that by strContainsOutO fBandChars u mean a utf-8
                  string.
                  Yes my mistake I had forgotten to actually save my test file as UTF-8

                  I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
                  (which works fine for me). I'll try IIS6 tomorrow.
                  >
                  On Jan 30, 5:20 pm, "Anthony Jones" <A...@yadayaday ada.comwrote:
                  <eyal.her...@gm ail.comwrote in message

                  news:1170166576 .102914.302180@ h3g2000cwc.goog legroups.com...
                  hi anthony,
                  to create a utf-8 cookie on the client side u should have a utf-8 html
                  page that sets the cookie through javascript.
                  to create a utf-8 cookie on the server side u need to have the <%@
                  codepage="65001 "%declerati on on top of your asp page.
                  Using:-

                  Response.Cookie s("test") = strContainsOutO fBandChars ??

                  In my testing characters outside of ASCII are removed when the codepage
                  is
                  UTF-8.

                  What server are you using?
                  >
                  >

                  Comment

                  • Anthony Jones

                    #10
                    Re: cookie codepage problem on iis 5.0


                    "Anthony Jones" <Ant@yadayadaya da.comwrote in message
                    news:umL0fJMRHH A.4252@TK2MSFTN GP05.phx.gbl...
                    >
                    <eyal.herlin@gm ail.comwrote in message
                    news:1170189419 .987023.230130@ l53g2000cwa.goo glegroups.com.. .
                    the problem i am having is on iis 5.0 on win2k.
                    >
                    That's the platform I'm testing on also.
                    >
                    it is my experience that Response.Cookie s("test") =
                    strContainsOutO fBandChars
                    works fine. i assumed that by strContainsOutO fBandChars u mean a utf-8
                    string.
                    >
                    Yes my mistake I had forgotten to actually save my test file as UTF-8
                    >
                    I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
                    (which works fine for me). I'll try IIS6 tomorrow.
                    >

                    IIS 6 works fine also. Looks like an enhancement since 5.1.


                    Comment

                    • eyal.herlin@gmail.com

                      #11
                      Re: cookie codepage problem on iis 5.0


                      On Jan 31, 2:41 pm, "Anthony Jones" <A...@yadayaday ada.comwrote:
                      "Anthony Jones" <A...@yadayaday ada.comwrote in message
                      >
                      news:umL0fJMRHH A.4252@TK2MSFTN GP05.phx.gbl...
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      <eyal.her...@gm ail.comwrote in message
                      news:1170189419 .987023.230130@ l53g2000cwa.goo glegroups.com.. .
                      the problem i am having is on iis 5.0 on win2k.
                      >
                      That's the platform I'm testing on also.
                      >
                      it is my experience that Response.Cookie s("test") =
                      strContainsOutO fBandChars
                      works fine. i assumed that by strContainsOutO fBandChars u mean a utf-8
                      string.
                      >
                      Yes my mistake I had forgotten to actually save my test file as UTF-8
                      >
                      I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
                      (which works fine for me). I'll try IIS6 tomorrow.
                      >
                      IIS 6 works fine also. Looks like an enhancement since 5.1.- Hide quoted text -
                      exactly
                      >
                      - Show quoted text -

                      Comment

                      Working...