How to solve this garbled code?

there is a proxy way to solve cross-domain problems.
I want to get

https://www.cnblogs.com/not-a.

since cross-domain access is not directly available,
http://anyorigin.com/
provides a forward proxy through a website that specializes in providing services, so that it can get the data and forward it to me.

$.getJSON("http://anyorigin.com/go?url=https://www.cnblogs.com/not-alone/articles/8552251.html&callback=?", function(data){
$("-sharpoutput").html(data.contents);});

 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

The content i got with proxy

<p id="output">

I successfully got the data, but all of it is garbled. Excuse me, how to solve it?

May.22,2021

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body>
    

The content i got with proxy

<p id="output">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $.ajax({ url: 'http://anyorigin.com/go?url=https%3A//www.cnblogs.com/not-alone/articles/8552251.html&callback=?', beforeSend: function (jqXHR) { jqXHR.overrideMimeType('application/json;charset=utf-8'); }, success: function (data) { $('-sharpoutput').html(data.contents); }, error: function (e) { var content = e.responseText; var data = JSON.parse(content.substr(2, content.length - 3)); $('-sharpoutput').html(data.contents); } }) </script> </body> </html>

clipboard.png


seems to be unsolvable because the proxy site uses ISO-8859-1 , while the original site uses UTF-8 because the code used by the proxy site is inconsistent with that of the original site.

Menu