search

Home  >  Q&A  >  body text

IOS端调用我写的接口Java端得到的数据乱码问题

测试登陆接口:IOS调用我java这边的登陆接口,我这边给返回的是一个Json串,结果发现Json串中的中文乱码,去百度说用new String(str.getByte(),“UTF-8”) 我试过了 发现还是不行 求大神有没有其它的方法?(解决思路两边同时转成UTF-8)

阿神阿神2867 days ago506

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-17 17:39:22

    The fastest way to solve this problem is to use UTF-8 entirely. The return encoding of the response uses UTF-8. IOS (web page) also uses UTF-8. Generally, there will be no problem.
    If it doesn’t work, please send your code and I will Let me help you take another look.

    reply
    0
  • Cancelreply