search

Home  >  Q&A  >  body text

java-web - android端与服务器端编码的问题

天蓬老师天蓬老师2771 days ago627

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:21:07

    Just use unicode or urlencode on both ends to avoid Chinese characters

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:21:07

    You may have made the wrong conversion. The server gave you gbk. If you want to convert to utf-8, it should be new String(str.getBytes("gbk"), "utf-8");另外,普遍的转换方式是new String(result.getBytes("ISO-8859-1"), "UTF-8");

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:21:07

    I think the next line of code should be encoded by urlencode in Chinese regardless of get or map in post.

    reply
    0
  • PHPz

    PHPz2017-04-17 17:21:07

    Try the method on the second floor. . It is estimated that the coding order is reversed.

    reply
    0
  • Cancelreply