I have a coldfusion page, uni.cfm:
<cfprocessingdirective pageencoding="utf-8">
<cfscript>
<cfdump var="#form.a#" label="form">
<cfdump var="#getHttpRequestData().content#" label="form2">
Sending the following HTTP request produces in the returned html first the string "???"
, then the string "a=ΠΣΩ"
.
POST http://localhost:8080/uni/unicode.cfm HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
User-Agent: unicli
Host: localhost:8080
Content-Length: 8
Pragma: no-cache
a=ΠΣΩ
Why does #form.a# NOT process the binary string correctly, while getHttpRequestData() does?
Having the sender change content-type to
multipart/form-data
with NO url-encoding worked like a charm:Then able to use #form.a# and get the right string!