# -*- coding: utf8 -*-
#! python 
print(repr("测试报警,xxxx是大猪头".decode("UTF8").encode("GBK")).replace("\\x","%"))

注意第一个 decode("UTF8") 要与文件声明的编码一样。

相关文章:

  • 2021-07-18
  • 2022-02-16
  • 2022-02-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-07-23
  • 2021-09-07
猜你喜欢
  • 2021-11-12
  • 2021-06-10
  • 2022-01-07
  • 2022-12-23
  • 2021-09-09
  • 2021-06-19
  • 2021-07-21
相关资源
相似解决方案