在做接口测试时,有时候返回的Json串中显示unicode码,如:‘\u53eb\u6211’,进行反编码后得到其对应的汉字。


 
  1. f='\u4f18\u8863\u5e93\u4fc3\u9500'  
  2. print f  
  3. print(f.decode('unicode-escape'))  

 

结果:优衣库促销

相关文章:

  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
猜你喜欢
  • 2021-08-05
  • 2021-07-04
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-01-26
相关资源
相似解决方案