Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse error: Invalid \uXXXX\uXXXX surrogate pair escape at line 276, column 28101 #2543

Closed
hktalent opened this issue Feb 25, 2023 · 6 comments

Comments

@hktalent
Copy link

hktalent commented Feb 25, 2023

jq - commandline JSON processor [version 1.6]

at line 276, column 28101:

"title": "\ufffd\ufffd\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd|\u032b\ufffd\ufffd\ufffd\ufffd|\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe", "sitemap_hash": null, "robots": "User-agent: *\nDisallow: /css\nDisallow: /js\nDisallow: /isotope\nDisallow: /fonts\n\nSitemap: https://www.bianyashebei.com/sitemap.xml", "server": "nginx", "headers_hash": -331709150, "host": "47.109.22.226", "html": "\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"gbk\">\n    <title>\ufffd\ufffd\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd|\u032b\ufffd\ufffd\ufffd\ufffd|\ufffd\ufffd\ufffd_\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd2009\ufffd\ufffd.\ufffd\ufffd\u04bb\ufffd\u04bc\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\ufffd\ufffd\u01a1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u06e1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04bb\ufffd\ufffd\ufffd\ufffd\u05b4\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04b5,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u026b\ufffd\ufffd\u0534\ufffd\ufffd\u0632\ufffd\u01b7\ufffd\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\u01a1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uc862\ufffd\ufffd\ufffd\u06f3\ufffd\ufffd\u06a1\ufffd\ufffd\ufffd\u04e6\ufffd\ufffd\ufffd\u01b9\u3e64\ufffd\ufffd.\u013f\u01f0\u04f5\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\u04bb\ufffd\ufffd\ufffd,UPS\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\u032b\ufffd\ufffd\ufffd\u0739\ufffd\ufffd\ufffd\ufffd\ufffd\u7ee7\ufffd\ufffd\u03f5\u0373,\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u026b\ufffd\ufffd\u0534\ufffd\ufffd\u0632\ufffd\u01b7,\ufffd\ufffd\ufffd\u01f5\u0132\ufffd\u01b7\ufffd\u06b9\ufffd\ufffd\u06b5\u00f5\ufffd\ufffd\u3dfa\u04e6\ufffd\u00f2\ufffd\u0536\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd.\">\n    <meta name=\"author\" content=\"\">\n    <link rel=\"shortcut icon\" href=\"img/\u037c\ufffd\ufffd.ico\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe\">\n    <meta name=\"keywords\" content=\"\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd,\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n    <!-- Bootstrap core CSS -->\n    <link href=\"css/bootstrap.css\" rel=\"stylesheet\">\n\n    \n    <link rel=\"stylesheet\" type=\"text/css\" href=\"css/animate.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"css/elements.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"css/custom.css\" />\n\n    \n    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->\n    <!--[if lt IE 9]>\n      <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>\n      <script src=\"https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js\"></script>\n    <![endif]-->\n    <style type=\"text/css\">\n<!--\n.STYLE2 {font-size: 16px}\n-->\n    </style>\n\t  <script>\nvar _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.src = \"https://hm.baidu.com/hm.js?7993657b63c2c352de6c028386598777\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n</script>\n</head>\n\n  <body>\n\n  <!-- Navbar\n    ============= -->\n    <div class=\"navbar navbar-inverse navbar-fixed-top\">\n      <div class=\"container\">\n        <div class=\"navbar-header\">\n          <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#global-navbar\">\n            <span class=\"icon-bar\"></span>\n            <span class=\"icon-bar\"></span>\n            <span class=\"icon-bar\"></span>\n          </button>\n          <a class=\"navbar-brand\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe</a>\n        </div>\n        <div class=\"collapse navbar-collapse\" id=\"global-navbar\">\n          <ul class=\"nav navbar-nav\">\n            <li class=\"dropdown active\">\n              <a href=\"https://www.bianyashebei.com\" class=\"dropdown-toggle\">\ufffd\ufffd\u04b3 </a>\n                <ul class=\"dropdown-menu\">\n               </ul>\n            </li>\n            <li class=\"dropdown\">\n              <a href=\"https://www.bianyashebei.com/chanpinliebiao.html\" class=\"dropdown-toggle\" >\ufffd\ufffd\u01b7\ufffd\ufffd\ufffd\ufffd </a>\n                <ul class=\"dropdown-menu\">\n                  </ul>\n            </li>\n            <li class=\"dropdown hidden-sm\">\n              <a href=\"https://www.bianyashebei.com/gongyiliucheng.html\" class=\"dropdown-toggle\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd </a>\n                <ul class=\"dropdown-menu\"></ul>\n            </li>\n            <li class=\"dropdown \">\n              <a href=\"https://www.bianyashebei.com/guanyugongsi.html\" class=\"dropdown-toggle\">\ufffd\ufffd\u02fe\ufffd\ufffd\ufffd </a>\n                <ul class=\"dropdown-menu\"></ul>\n            </li>\n            <li class=\"dropdown hidden-sm\">\n              <a href=\"https://www.bianyashebei.com/xinwenliebiao.html\" class=\"dropdown-toggle\">\u05aa\u02b6\ufffd\u02b4\ufffd </a>\n                <ul class=\"dropdown-menu\"></ul>\n            </li>\n            <ul class=\"dropdown-menu\"></ul>\n            </li>\n            <li class=\"dropdown hidden-sm\">\n              <a href=\"https://www.bianyashebei.com/lianxiwomen.html\" class=\"dropdown-toggle\">\ufffd\ufffd\u03f5\ufffd\ufffd\ufffd\ufffd </a>\n                <ul class=\"dropdown-menu\"></ul>\n            </li>\n              \n            \n          </ul>\n          \n          <ul class=\"nav navbar-nav navbar-right hidden-xs\">\n            <!-- Sign in & Sign up -->\n            \n            <li><a>\ufffd\u7ef0\ufffd\ufffd\u046f\ufffd\ufffd13282237889 </a>        </li>\n            \n            \n            \n            <!-- Search Button -->\n            \n          </ul>\n        </div>\n      </div>\n    </div>\n    \n  <div class=\"wrapper\">    \n  <!-- Showcase\n    ================ -->\n    <div id=\"wrap\">\n      <div class=\"container\">\n        <div class=\"row\">\n          <div class=\"col-md-6 col-sm-12\">\n            <h1 class=\"animated slideInDown\"><a href=\"https://www.bianyashebei.com/\"><img src=\"img/logo.jpg\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe\" width=\"120\" height=\"40\"></a>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u017c\ufffd\ufffd\ufffd\ufffd\ufffd</h1>\n            <div class=\"list\">\n              <ul>\n                <li class=\"animated slideInLeft first\"><span> \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</span></li>\n                <li class=\"animated slideInLeft second\"><span> \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\u022b\ufffd\ufffd</span></li>\n                <li class=\"animated slideInLeft third\"><span> \ufffd\ufffd\ufffd\ufffd\ufffd\u052a\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\u022b\ufffd\u027f\ufffd\ufffd\ufffd</span></li>\n                <li class=\"animated slideInLeft first\"><span> \ufffd\ufffd\ufffd\u1e69OEM/ODM\ufffd\ufffd\ufffd\u01a1\ufffd</span></li>\n              </ul>\n            </div>\n          </div>\n          <div class=\"col-md-6 hidden-sm hidden-xs\">\n            <div class=\"showcase\">\n              \n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class=\"container\">\n      <!-- Services\n        ================ -->\n      <div class=\"row\">\n        <div class=\"col-md-12\">\n          <div class=\"services\">\n            <ul>\n                \n</ul>\n            <div class=\"clearfix\"></div>\n          </div>\n        </div>\n      </div>\n      <div class=\"row\">\n      \n      <div class=\"row\">\n        <div class=\"col-md-12 block-header\">\n          <h2>\n            <span class=\"title\">\ufffd\ufffd\ufffd\ufffd\ufffd</span><span class=\"decoration\"></span><span class=\"decoration\"></span><span class=\"decoration\"></span>\n          </h2>\n        </div>\n      </div>\n      <div class=\"row\">\n        <div class=\"col-md-3 col-sm-6\">\n          <a href=\"https://www.bianyashebei.com/chunzhengxianbo.html\"><div class=\"thumbnail\">\n            <img src=\"img/p-300.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4>\n            <div class=\"rating\"></div></div></div></a>\n          \n                \n          <a href=\"https://www.bianyashebei.com/yidongguangfu.html\"><div class=\"thumbnail\">\n            <img src=\"img/yidongshi.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n           <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4>\n            <div class=\"rating\"></div></div></div></a></div>\n                \n        <div class=\"col-md-3 col-sm-6\">\n          <a href=\"https://www.bianyashebei.com/xiuzhengxianbo.html\"><div class=\"thumbnail\">\n            <img src=\"img/m-150.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4>\n            <div class=\"rating\"></div></div></div></a>\n          \n          \n          <a href=\"https://www.bianyashebei.com/liwangtaiyangneng.html\"><div class=\"thumbnail\">\n            <img src=\"img/3KW.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0534</h4>\n            <div class=\"rating\"></div> </div></div></a>\n                \n                \n        </div>\n        <div class=\"clearfix visible-sm\"></div>\n        <div class=\"col-md-3 col-sm-6\">\n          <a href=\"https://www.bianyashebei.com/xiuzhengxianbo.html\"><div class=\"thumbnail\">\n            <img src=\"img/m-300.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4>\n            <div class=\"rating\"></div></div></div></a>\n                \n          <a href=\"https://www.bianyashebei.com/taiyangnengliebiao.html\"><div class=\"thumbnail\">\n          <img src=\"img/yidongshi2.jpg\" class=\"img-responsive\" alt=\"\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\"> \n          <div class=\"caption\"> \n          <h4>\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4> \n            <div class=\"rating\"></div></div></div></a></div>\n                \n        <div class=\"col-md-3 col-sm-6\">\n          <a href=\"https://www.bianyashebei.com/bingwangnibianqi.html\"><div class=\"thumbnail\">\n            <img src=\"img/bwnbq.jpg\" class=\"img-responsive\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            \n            <div class=\"caption\">\n              <h4>\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0534</h4>\n                <div class=\"rating\"></div></div></div></a>\n                \n                \n          \n         <a href=\"https://www.bianyashebei.com/chongdiankongzhiqi.html\"> <div class=\"thumbnail\">\n            <img src=\"img/mppt.jpg\" class=\"img-responsive\" alt=\"\u032b\ufffd\ufffd\ufffd\u0733\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\">\n            \n            <div class=\"caption\">\n              <h4>\u032b\ufffd\ufffd\ufffd\u0733\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</h4>\n            <div class=\"rating\"> </div></div></div></a>\n                \n                \n        </div>\n      </div>\n    </div>\n        <!-- Welcome message\n            ================= -->\n        <div class=\"col-md-8\">\n        <div class=\"block-header\">\n          <h2>\n            <span class=\"title\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</span><span class=\"decoration\"></span><span class=\"decoration\"></span><span class=\"decoration\"></span>\n          </h2>\n        </div>\n          <img src=\"img/men.jpg\" class=\"img-about img-responsive\" alt=\"About\">\n          <p>\n          <h3><span class=\"STYLE2\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd2009\ufffd\ua863\ufffd\ufffd\u04bb\ufffd\u04bc\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\ufffd\ufffd\u01a1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u06e1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04bb\ufffd\ufffd\ufffd\ufffd\u05b4\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04b5\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u026b\ufffd\ufffd\u0534\ufffd\ufffd\u0632\ufffd\u01b7\ufffd\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\u01a1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uc862\ufffd\ufffd\ufffd\u06f3\ufffd\ufffd\u06a1\ufffd\ufffd\ufffd\u04e6\ufffd\ufffd\ufffd\u01b9\u3e64\ufffd\ufffd\ufffd\ufffd\u013f\u01f0\u04f5\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\u0723\ufffd\ufffd\ufffd\ufffd\u0723\ufffd\ufffd\ufffd\ufffd\u0623\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04bb\ufffd\ufffd\ufffd\ufffd\ufffdUPS\ufffd\ufffd\ufffd\ufffd\u0534\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\u0739\ufffd\ufffd\ufffd\ufffd\ufffd\u7ee7\ufffd\ufffd\u03f5\u0373\ufffd\ufffd\u032b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u026b\ufffd\ufffd\u0534\ufffd\ufffd\u0632\ufffd\u01b7\ufffd\ufffd\ufffd\ufffd\ufffd\u01f5\u0132\ufffd\u01b7\ufffd\u06b9\ufffd\ufffd\u06b5\u00f5\ufffd\ufffd\u3dfa\u04e6\ufffd\u00f2\ufffd\u0536\ufffd\ufffd\ufffd\ufffd\ufffd\u2863</span><br />\n            <span class=\"STYLE2\">\ufffd\ufffd\u02fe\u04f5\ufffd\ufffd\ufffd\u06fa\ufffd\u013c\ufffd\ufffd\ufffd\u02b5\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0228\ufffd\ufffd\ufffd\ufffd\ufffd\u043b\ufffd\ufffd\ufffd\ufffd\ufffd\u05e8\ufffd\u04bd\ufffd\ufffd\ufffd\ufffd\u02fd\ufffd\ufffd\u0735\u0133\ufffd\ufffd\u06ba\ufffd\ufffd\ufffd\ufffd\ufffd\u03f5\ufffd\ufffd2014\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0177\ufffd\u07b4\ufffd\ufffd\u00bc\ufffd\ufffd\ufffd\ufffd\ufffd\u022b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u02f2\ufffd\u01b7\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04b5\ufffd\ufffd\ufffd\ud8ec\ufffd\u0739\ufffd\u03aa\ufffd\u037b\ufffd\ufffd\u1e69\ufffd\ufffd\u022b\ufffd\u6862\u05e8\u04b5\ufffd\ufffd\ufffd\ufffd\u0427\ufffd\u013d\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u027f\ufffd\ufffd\ufffd\ufffd\u023d\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u02b2\ufffd\u01b7\ufffd\ufffd\ufffd\u037c\ufffd\u02b1\ufffd\ufffd\ufffd\ufffd\u03e1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0538\ufffd\ufffd\u05e8\u05e2\ufffd\u013e\ufffd\ufffd\ufffd\u05e8\u04b5\ufffd\u013c\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u042f\ufffd\u05b9\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\uc8e1</span> </h3>\n          </p>\n          <div class=\"info-board info-board-blue\">\n            <h4>*\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0175\ufffd</h4>\n            <p><span class=\"services\">\ufffd\ufffd\u04bb\ufffd\u38ec\ufffd\ufffd\ufffd\u043f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05ea\ufffd\ufffd\ufffd\ufffd\u0427\ufffd\u02b7\u01f3\ufffd\ufffd\u07f5\ufffd\ufffd\u0635\u3863\ufffd\u01f3\ufffd\u05b5\ufffd\ufffd\u04bb\u02f5\ufffd\ufffd\ufffd\u01e3\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05ae\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u073a\u0379\ufffd\ufffd\u0736\ufffd\ufffd\u00f5\ufffd\ufffd\u02f7\u01f3\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05ea\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0676\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u02f2\ufffd\ufffd\u0663\ufffd\ufffd\ufffd\u02b9\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0139\ufffd\ufffd\ufffd\u0427\ufffd\ufffd\u04b2\ufffd\u00f5\ufffd\ufffd\u02fa\u0734\ufffd\u0336\u0235\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u02e3\ufffd\ufffd\ufffd\ufffd\u01f8\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04aa\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05ea\ufffd\ufffd\ufffd\ufffd\ufffd\u0676\ufffd\ufffd\ufffd\ufffd\u2863\n<br />\ufffd\u06b6\ufffd\ufffd\u38ec\ufffd\ufffd\ufffd\u00f2\ufffd\u02f5\ufffd\ufffd\ufffd\u01f0\ufffd\u022b\ufffd\ufffd\ufffd\u01fe\ufffd\ufffd\u0475\u0121\ufffd\ufffd\ufffd\u03bd\ufffd\u00f5\u7c32\u022b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04aa\ufffd\u0123\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\u02b1\ufffd\ufffd\ufffd\u0437\ufffd\ufffd\ufffd\u0531\ufffd\u037a\u073a\u00f5\u013f\ufffd\ufffd\u01f5\ufffd\ufffd\u02f6\ufffd\u00b7\ufffd\ufffd\ufffd\ufffd\u0479\ufffd\ufffd\ufffd\u053c\ufffd\ufffd\ufffd\ufffd\u00b5\u0236\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04e6\ufffd\u0534\ufffd\u02a9\ufffd\ufffd\u02b9\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u07f1\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0429\ufffd\ufffd\ufffd\ufffd\u0139\ufffd\ufffd\u0721\ufffd\ufffd\ufffd\u02e3\ufffd\ufffd\ufffd\ufffd\u01f7\u01f3\ufffd\ufffd\ufffd\u022b\ufffd\u0135\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u07e3\ufffd\ufffd\ufffd\u02b9\ufffd\u00f5\u0139\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01f2\ufffd\ufffd\u00f5\ufffd\ufffd\u0130\ufffd\u022b\ufffd\ufffd\ufffd\ufffd\ufffd\u0121\ufffd\n<br />\ufffd\ufffd\ufffd\ufffd\ufffd\u38ec\ufffd\ufffd\ufffd\u0437\u01f3\ufffd\ufffd\u00f5\ufffd\ufffd\u0236\ufffd\ufffd\u0523\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0479\ufffd\ufffd\ufffd\u38ec\ufffd\ufffd\ufffd\ufffd\ufffd\u01f8\ufffd\u0479\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u02b1\ufffd\ufffd\ufffd\u0739\ufffd\ufffd\u03fa\ufffd \ufffd\u0131\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0732\ufffd\ufffd\ufffd\u0131\u4863</p>\n\n          \n            \n      </div>\n        </div>\n        <!-- Last updated\n            ================== -->\n        <div class=\"col-md-4\">\n        <div class=\"block-header\">\n          <h2>\n            <span class=\"title\">\ufffd\ufffd\ufffd\u0172\ufffd\u01b7</span><span class=\"decoration\"></span><span class=\"decoration\"></span><span class=\"decoration\"></span>\n          </h2>\n        </div>\n        <ul class=\"nav nav-tabs\">\n         \n          \n         \n        </ul>\n        <div class=\"tab-content\">\n          <div class=\"tab-pane active\" id=\"blog\">\n            <div class=\"media\">\n            \n              <a class=\"pull-left\" href=\"https://www.bianyashebei.com/chunzhengxianbo.html\">\n                <img class=\"media-object\" src=\"img/p-500.jpg\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\"></a>             \n                \n              \n              <div class=\"media-body\">\n                <h4 class=\"media-heading\">&nbsp;</h4>\n                <h4 class=\"media-heading\"><a href=\"https://www.bianyashebei.com/chunzhengxianbo.html\">\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</a></h4>\n              </div>\n            </div>\n            \n            <div class=\"media\">\n              <a class=\"pull-left\" href=\"https://www.bianyashebei.com/xiuzhengxianbo.html\">\n                <img class=\"media-object\" src=\"img/m-500.jpg\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\"></a>\n              \n              <div class=\"media-body\">\n                <h4 class=\"media-heading\">&nbsp;</h4>\n                <h4 class=\"media-heading\"><a href=\"https://www.bianyashebei.com/xiuzhengxianbo.html\">\ufffd\ufffd\ufffd\ufffd\ufffd\u04b2\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</a></h4>\n              </div>\n            </div>\n            <div class=\"media\">\n              <a class=\"pull-left\" href=\"https://www.bianyashebei.com/taiyangneng.html\">\n                <img class=\"media-object\" src=\"img/bxstyn.jpg\" alt=\"\ufffd\ufffd\u042f\u02bd\u032b\ufffd\ufffd\ufffd\ufffd\"></a>\n              \n              <div class=\"media-body\">\n                <h4 class=\"media-heading\">&nbsp;</h4>\n                <h4 class=\"media-heading\"><a href=\"https://www.bianyashebei.com/taiyangneng.html\">\ufffd\ufffd\u042f\u02bd\u032b\ufffd\ufffd\ufffd\ufffd</a></h4>\n              </div>\n            </div>\n            <div class=\"media\">\n              <a class=\"pull-left\" href=\"https://www.bianyashebei.com/yidongguangfu.html\">\n                <img class=\"media-object\" src=\"img/yidongshi.jpg\" alt=\"\ufffd\u01b6\ufffd\u02bd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u03f5\u0373\"></a>\n                \n              \n              <div class=\"media-body\">\n                <h4 class=\"media-heading\">&nbsp;</h4>\n                <h4 class=\"media-heading\"><a href=\"https://www.bianyashebei.com/yidongguangfu.html\">\ufffd\u01b6\ufffd\u02bd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u03f5\u0373</a></h4>\n              </div>\n              \n            </div>\n            <a href=\"https://www.bianyashebei.com/chanpinliebiao.html\" class=\"read-more\">\ufffd\ufffd\u01b7\ufffd\ufffd\ufffd\ufffd</a>\n          </div>\n          \n         \n        </div>\n        </div>\n      </div>\n       </div>\n  \n    \n<!-- Foooter\n================== -->\n  <footer>\n    <div class=\"container\">\n      <div class=\"row\">\n        <!-- Contact Us \n        =================  -->\n        <div class=\"col-sm-4\">\n          <div class=\"headline\"><h3>\ufffd\ufffd\u03f5\ufffd\ufffd\ufffd\ufffd</h3></div>\n          <div class=\"content\">\n            <p><h4>\n            \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \ufffd\ufffd \u02fe<br />\n            \ufffd\ufffd\u05b7\ufffd\ufffd\ufffd\u3f6d\u02a1\ufffd\ufffd\u04a6\ufffd\ufffd\ufffd\ufffd\u4fb9\ufffd\u04b5\u0530\ufffd\ufffd\ufffd\ufffd\ufffd\u02f6\ufffd\u00b71\ufffd\ufffd<br />\n            \ufffd\u05bb\ufffd\ufffd\ufffd132 8223 7889<br />\n            \ufffd\ufffd\ufffd\u68fa0574-62483965<br />\n            Q Q\ufffd\ufffd<a href=\"tencent://message/?uin=87680059&amp;Site=www.bianyashebei.com&amp;Menu=yes\" target=\"_blank\">87680059</a><br />\n            Email: sales@bianyashebei.com<br />\n            <strong>\ufffd\ufffd\u05b7\ufffd\ufffd<a href=\"https://www.bianyashebei.com\">www.bianyashebei.com</a></strong>\n            </h4></p>\n          </div>\n        </div>\n        <!-- Social icons \n        ===================== -->\n        <div class=\"col-sm-4\">\n          <div class=\"headline\">\n            <h3>\u0268\ufffd\ufffd\ufffd\u03ac\ufffd\ufffd\ufffd\ufffd\ufffd\u03a2\ufffd\ufffd</h3>\n          </div>\n          <div class=\"content social\">         \n            <div class=\"clearfix\"><img src=\"img/111.png\" alt=\"\u0268\ufffd\ufffd\ufffd\u03ac\ufffd\ubc63\ufffd\ufffd\ufffd\ufffd\u03f5\ufffd\ufffd\u03e2\ufffd\ufffd\ufffd\ufffd\ufffd\u0534\ufffd\ufffd\" width=\"150\" height=\"150\" class=\"img-responsive\"></div>\n          </div>\n        </div>\n        <!-- Subscribe \n        =============== -->\n       <div class=\"col-sm-4\">\n          <div class=\"headline\">\n            <h3>\ufffd\ufffd\ufffd\u03fb\ufffd\ufffd\ufffd</h3></div>\n          <div class=\"content\">\n            <p><h4><br />\ufffd\ufffd\ufffd\u01f5\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0368\ufffd\ufffd\ufffd\ufffd\ufffd\uec32\ufffd\ufffd\ufffd\ufffd\u05a4,\ufffd\ufffdROHS,PAHS,REACH,\ufffd\u023b\ufffd\ufffd\ufffd\u04aa\ufffd\ufffd\u05a4\ufffd\u98ec\ufffd\ufffd\ufffd\ufffd\u026b\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01b7\ufffd\ufffd</h4><img src=\"img/blog-huanbao.png\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05be\" width=\"220\" height=\"55\"><img src=\"img/iso.jpg\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffdISO\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u03f5\" width=\"55\" height=\"55\">\n            </p>\n            \n             <form class=\"form\" role=\"form\">\n              <div class=\"row\">\n                <div class=\"col-sm-8\"></div>\n              </div>\n            </form>\n          </div>\n        </div>\n      </div>\n    </div>\n  </footer>\n  <!-- Legal \n  ============= -->\n  <div class=\"legal\">\n    <div class=\"container\">\n      <div class=\"row\">\n        <div class=\"col-sm-12\">\n          <p><img src=\"img/logo.jpg\" alt=\"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u01bc\ufffd\ufffd\ufffd\ufffd\u07b9\ufffd\u02fe\" width=\"100\" height=\"25\">&copy; \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u04e3\ufffd\n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  <a href=\"http://www.xinjindong.cn\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0575\ufffd</a> |\n\t\t\t  <a href=\"https://www.acdianyuanxian.com\" target=\"_blank\">\ufffd\ufffd\u0534\ufffd\ufffd</a>|\n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  \n\t\t\t  <a href=\"http://www.golechina.com\">\ufffd\ufffd\u04b5\ufffd\ufffd\ufffd\ufffd\u04bb\ufffd\ufffd\ufffd</a> |\n\t\t\t  \n\t\t\t  <a href=\"http://www.jnsgpower.com\">\ufffd\ufffd\u02bd\ufffd\ufffd\ufffd\ufffd\ufffd</a> |\n\t\t\t  \n\t\t\t  \n\t\t\t  <a href=\"\"></a><span class=\"qty pull-right\"><a href=\"sitemap.xml\">\ufffd\ufffd\u057e\ufffd\ufffd\u037c</a></span></p> \n\t\t  \n\t\t \n\n        </div>\n      </div>\n    </div>\n  </div>\n    <!-- Bootstrap core JavaScript\n    ================================================== -->\n    <!-- Placed at the end of the document so the pages load faster -->\n    <script src=\"js/jquery.min.js\"></script>\n    <script src=\"js/bootstrap.min.js\"></script>\n    <script src=\"js/custom.js\"></script>\n    <script src=\"js/scrolltopcontrol.js\"></script><!-- Scroll to top javascript -->\n\n    \n  </body>\n</html>",
@wader
Copy link
Member

wader commented Feb 25, 2023

Hi, please cleanup your question formatting and figure out what's on line 276, would make it much easier to help.

@wader
Copy link
Member

wader commented Feb 27, 2023

The only surrogate escape i see is \ud8ec (has the range \xd8##-\xdf##) and it's surrounded by \ufffd, they should come in pairs. So i would something has generated invalid JSON for some reason.

$ jq -n '"\ufffd\ud8ec\ufffd"'
jq: error: Invalid \uXXXX\uXXXX surrogate pair escape at line 1, column 20 (while parsing '"\ufffd\ud8ec\ufffd"') at <top-level>, line 1:
"\ufffd\ud8ec\ufffd"
jq: 1 compile error

@hktalent
Copy link
Author

@wader
x.txt
I'm sure that using golang to read json can json.Unmarshal is ok

@wader
Copy link
Member

wader commented Feb 27, 2023

Ok, i guess it boils down to this section from the JSON spec https://www.rfc-editor.org/rfc/rfc8259 and that different implementations behave differently in this "unpredictable" case:

8.2].  Unicode Characters

   When all the strings represented in a JSON text are composed entirely
   of Unicode characters [[UNICODE](https://www.rfc-editor.org/rfc/rfc8259#ref-UNICODE)] (however escaped), then that JSON
   text is interoperable in the sense that all software implementations
   that parse it will agree on the contents of names and of string
   values in objects and arrays.

   However, the ABNF in this specification allows member names and
   string values to contain bit sequences that cannot encode Unicode
   characters; for example, "\uDEAD" (a single unpaired UTF-16
   surrogate).  Instances of this have been observed, for example, when
   a library truncates a UTF-16 string without checking whether the
   truncation split a surrogate pair.  The behavior of software that
   receives JSON texts containing such values is unpredictable; for
   example, implementations might return different values for the length
   of a string value or even suffer fatal runtime exceptions.

@alice-systems
Copy link

alice-systems commented Dec 9, 2024

I have removed some comments I left after realizing my "straightforward" suggestion was based on a misunderstanding of the problem, my apologies. My advice to anyone who wants to avoid the same mistake as me: remember that the \uxxxx escape sequences represent UTF-16 code units, not Unicode code points.

It's a tricky problem for sure, it would be nice to handle this as it's technically valid JSON, but the both the ECMA and IETF specs don't appear to give any guidance on how to do so. U+FFFD seems like part of the solution, but it's unclear whether it would be better to replace an invalid pair with U+FFFD or just the unmatched surrogate.

If we accept the assumption the RFC seems to make in the passage quoted by @wader above (that most or all instances of an unmatched surrogate come from incorrectly truncating UTF-16), then I guess the pragmatic approach would be to consume just the unmatched surrogate (if this assumption is false, this results in a single garbage character in the output, which is far preferable to if the assumption is true and we consume both, scrambling all immediately subsequent "healthy" surrogate pairs).

One thing I haven't fully explored the implications of: if you feed random bytes into jq -R, it never produces an error. I'm assuming jq is parsing that as utf-8, if so I think this means that jq already has a mechanism for handling unmatched surrogates, at least for utf-8 code units. It appears jq also happily accepts random bytes (excluding ", \, and anything below 0x20) inside quoted strings, so there's some precedent for handling unmatched surrogates, albeit in utf-8 (jq's behavior there is to replace with U+FFFD, TBD whether that code point replaces just the surrogates or also the relevant following characters)

@alice-systems
Copy link

alice-systems commented Dec 9, 2024

Update:

% printf -- %s $'\xc3\x80d' | jq -R                         
"Àd"
% printf -- %s $'\xc3d' | jq -R               
"�d"

Looks like jq handles unmatched utf-8 surrogates by just replacing the surrogate, and leaves the following character intact, matching the "pragmatic" option above. (no idea how it handles partial 3 and 4 byte sequences missing a surrogate but that's less relevant as precedent for how to deal with utf-16).

Given that jq does handle unmatched surrogates in some cases, I think that allows one to consider this handling of escape sequences to be inconsistent behavior, and possibly worth considering a bug if anyone is interested in re-opening this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants