Difference in URL decode/encode UTF-8 between Java and JS/AS3 (bug!?)

后端 未结 3 703
无人及你
无人及你 2021-01-06 00:50

I am having an issue URL decoding a UTF-8 string in Java that is encoded either with Javascript or Actionscript 3. I\'ve set up a test case as follows:

The string in

3条回答
  •  孤独总比滥情好
    2021-01-06 01:43

    escape is a deprecated function and does not correctly encode Unicode characters. Use encodeURI or encodeURIComponent, the latter probably being the method most suitable for your needs.

提交回复
热议问题