zoukankan      html  css  js  c++  java
  • 解决charles中文乱码(附代码)

    1. 将下面的代码保存为一个*.xml的文件

    <?xml version='1.0' encoding='UTF-8' ?>
    <?charles serialisation-version='2.0' ?>
    <rewriteSet-array>
      <rewriteSet>
        <active>true</active>
        <name>modify content-type</name>
        <hosts>
          <locationPatterns>
            <locationMatch>
              <location>
                <host>xdcs-collector.ximalaya.com</host>
              </location>
              <enabled>true</enabled>
            </locationMatch>
          </locationPatterns>
        </hosts>
        <rules>
          <rewriteRule>
            <active>true</active>
            <ruleType>3</ruleType>
            <matchHeader>Content-Type</matchHeader>
            <matchValue>.*</matchValue>
            <matchHeaderRegex>true</matchHeaderRegex>
            <matchValueRegex>true</matchValueRegex>
            <matchRequest>true</matchRequest>
            <matchResponse>false</matchResponse>
            <newHeader>Content-Type</newHeader>
            <newValue>text/plain;charset=utf-8</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>true</caseSensitive>
            <replaceType>1</replaceType>
          </rewriteRule>
        </rules>
      </rewriteSet>
    </rewriteSet-array>

    2. 打开 charles 工具->Tools->rewrite->import导入上述文件即可。

  • 相关阅读:
    fastjson 简单使用 及其JSONObject使用
    HttpClient 的使用
    python操作excel xlwt (转)
    matplotlib 设置标题 xy标题等
    matplotlib 饼状图
    Mac下面 matplotlib 中文无法显示解决
    matplotlib 折线图
    matplotlib条形图
    matplotlib直方图
    python matplotlib配置
  • 原文地址:https://www.cnblogs.com/xiyuan2016/p/9173285.html
Copyright © 2011-2022 走看看