<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Georgia">And I see that's exactly what newer versions of
      this method do...<br>
      <br>
      decodeUrlEncodedForm: string multipleValues: boolean<br>
          | dict key value start end eqSignPos more |<br>
          dict := boolean ifTrue: [HttpFormDictionary new] ifFalse:
      [Dictionary new].<br>
          string isEmptyOrNil ifTrue: [^dict].<br>
          more := true.<br>
          start := 1.<br>
          [end := string indexOf: $&amp; startingAt: start.<br>
          end == 0<br>
              ifTrue: [end := string size. more := false]<br>
              ifFalse: [end := end - 1].<br>
          eqSignPos := string indexOf: $= startingAt: start.<br>
          (eqSignPos &gt; end or: [eqSignPos == 0])<br>
              ifTrue: [key := (key := string copyFrom: start to: end)
      unescapePercentsWithTextEncoding: nil.<br>
                  value := '']<br>
              ifFalse: [key := (key := string copyFrom: start to:
      eqSignPos-1) unescapePercentsWithTextEncoding: nil.<br>
                  value := (value := string copyFrom: eqSignPos+1 to:
      end) unescapePercentsWithTextEncoding: nil].<br>
          self addKey: key value: value toForm: dict multipleValues:
      boolean.<br>
          start := end + 2.<br>
          more] whileTrue.<br>
      <br>
          ^dict<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 12/23/13 11:04 AM, Bob Arning wrote:<br>
    </div>
    <blockquote cite="mid:52B85F0C.4090805@comcast.net" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      I see how it happens...<br>
      <br>
      using Mac, Chrome with 8859-1 encoding as default, I typed <br>
          <br>
          S, t, option-e, e, p, h, a, n, e <br>
      <br>
      in the login screen. What arrives back at the server is<br>
      <br>
          '11=St%E9phane&amp;12=&amp;13=Login'<br>
      <br>
      wherupon HttpRequest tries to parse this<br>
      -----<br>
      <font face="Georgia">decodeUrlEncodedForm: string multipleValues:
        boolean<br>
            | dict key value start end eqSignPos more |<br>
            dict _ boolean ifTrue: [HttpFormDictionary new] ifFalse:
        [Dictionary new].<br>
            string isEmptyOrNil ifTrue: [^dict].<br>
            more _ true.<br>
            start _ 1.<br>
            [end _ string indexOf: $&amp; startingAt: start.<br>
            end == 0<br>
                ifTrue: [end _ string size. more _ false]<br>
                ifFalse: [end _ end - 1].<br>
            eqSignPos _ string indexOf: $= startingAt: start.<br>
            (eqSignPos &gt; end or: [eqSignPos == 0])<br>
                ifTrue: [key _ (key _ string copyFrom: start to: end)
        unescapePercents.<br>
                    value _ '']<br>
                ifFalse: [key _ (key _ string copyFrom: start to:
        eqSignPos-1) unescapePercents.<br>
                    value _ (value _ string copyFrom: eqSignPos+1 to:
        end) <b>unescapePercents</b>].<br>
            self addKey: key value: value toForm: dict multipleValues:
        boolean.<br>
            start _ end + 2.<br>
            more] whileTrue.<br>
        <br>
            ^dict<br>
        -----<br>
        and #</font><font face="Georgia">unescapePercents does<br>
        <br>
        self unescapePercentsWithTextEncoding: 'utf-8'<br>
        <br>
            'St%E9phane' unescapePercents ==&gt; 'St鰨ane'<br>
        <br>
        whereas, if we knew it was not utf-8, then<br>
        <br>
            'St%E9phane' unescapePercentsWithTextEncoding: nil ==&gt;
        'Stéphane'<br>
        <br>
        gives the expected answer. I tried to coax my browser to return
        utf-8, but that had no effect, so I'm wondering if this
        application would be better off using   </font><br>
      <font face="Georgia"><font face="Georgia">       
          unescapePercentsWithTextEncoding: nil<br>
          rather than<br>
              </font></font><font face="Georgia"><font face="Georgia"><font
            face="Georgia">    unescapePercents<br>
            <br>
          </font></font>Cheers,<br>
        Bob<br>
        <br>
      </font>
      <div class="moz-cite-prefix">On 12/23/13 8:15 AM, Philippe
        Marschall wrote:<br>
      </div>
      <blockquote
cite="mid:CA+LFMPi2N5paeQymWGswL+tW0sMMQgP+B4NOLPWYvxZd5Vd1Gw@mail.gmail.com"
        type="cite">
        <pre wrap="">On Mon, Dec 23, 2013 at 1:43 PM, Bob Arning <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net">&lt;arning315@comcast.net&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap=""> It is a WideString and

self asArray collect: [ :e | e asciiValue radix: 16] = #('53' '74'
'3FC09C28' '61' '6E' '65' '20' '4D' '75' '6E' '69' '6F' '7A')
</pre>
        </blockquote>
        <pre wrap="">Interesting, so somebody somewhere along the way converted the input
from something (likely utf-8 although the page is iso-8859-1) to
Squeak encoding.

Cheers
Philippe
_______________________________________________
seaside mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>

</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>