为什么用Jsoup解析后内容不一样

Why content is not same after parsing with Jsoup

我正在尝试解析 this url using JSOUP. I am getting parsed doc something like unicode format not the actual data while I am parsing this url 根据需要给我正确的印地文文本。我正在使用下面的代码来解析 URl。顺便说一句 url 托管在我的网站上。服务器上的文本文件有问题吗?我想不通。

    Document doc = Jsoup
            .connect(
                    "hindi-stories.kratav.com/content/social_aalha.html")
            .userAgent("Mozilla").timeout(15 * 1000).get(); 

你查看第一个URL的源代码,没有指定编码。而第二个有一个元:

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

尝试使用指定字符集的方法解析第一个 URL,即:

Document document = Jsoup.parse(new URL(url).openStream(), "UTF-16", url);