<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
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&12=&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: $& 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 > 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 ==> 'St鰨ane'<br>
<br>
whereas, if we knew it was not utf-8, then<br>
<br>
'St%E9phane' unescapePercentsWithTextEncoding: nil ==>
'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 class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net"><arning315@comcast.net></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 class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a 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>
</body>
</html>