1

I am trying to submit a form which contains UTF-8 characters.

<form id="workflowPersistForm" class="invisibleClass" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded; charset=UTF-8" method="post" action="/workflow-next">
  <input id="stateGlobal" type="hidden" value="お問い合わせ" name="state"/>
</form>

The problem is that in the query logs, the Japanese characters are garbled, from the response it looks like they are double encoded(UTF-8).

Everything works if I do a GET instead of POST. Can anyone please help me out? Where is this getting doubly-encoded? How can I fix it?

RooKie-
  • 1,373
  • 3
  • 13
  • 24
Bulbasaur
  • 696
  • 1
  • 14
  • 22

1 Answers1

-1

As far as I know, You can't actually 'double encode' UTF-8(Unlike binary encodings like Hex and Base64), if you apply the same operation twice, nothing is going to happen(meaning the input will stay the same as with once)

what exactly are you getting? How are you processing that input?

ilyail3
  • 74
  • 4
  • 1
    Usually double encoded UTF-8 refers to encoding something as UTF-8, decoding the result as ISO-8859-1, and encoding as UTF-8 again. Due to the [properties of ISO-8859-1](http://stackoverflow.com/a/15938015/995876), this could be called double utf-8 encoding. – Esailija Apr 16 '13 at 08:06