Decoding html returned as json response - android

前端 未结 4 1808
独厮守ぢ
独厮守ぢ 2021-01-07 02:04

I am getting following encoded html as a json response and has no idea how to decode it to normal html string, which is an achor tag by the way.

x3ca hrefx3d         


        
4条回答
  •  时光取名叫无心
    2021-01-07 02:48

    This works for me

        public static String convertUTF8Units_version2(String input) throws UnsupportedEncodingException
        {
             return URLDecoder.decode(input.replaceAll("\\\\x", "%"),"UTF-8");
        }
    

提交回复
热议问题