From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Eww can't display Chinese characters correctly. Date: Sun, 20 Dec 2020 09:13:38 +0800 Message-ID: References: <87sg88xza8.fsf@codeisgreat.org> <87tuso30wh.fsf@gnus.org> <87lfe0307l.fsf@gnus.org> <877dpk2ysn.fsf@gnus.org> <87r1nlj03c.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11738"; mail-complaints-to="usenet@ciao.gmane.io" Cc: William Xu , help-gnu-emacs To: Lars Ingebrigtsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 20 02:14:51 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqnJC-0002w1-8f for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Dec 2020 02:14:50 +0100 Original-Received: from localhost ([::1]:42870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqnJB-0001J2-7N for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 20:14:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqnIL-0001Hh-As for help-gnu-emacs@gnu.org; Sat, 19 Dec 2020 20:13:57 -0500 Original-Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]:41115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqnIF-0005Gq-W2 for help-gnu-emacs@gnu.org; Sat, 19 Dec 2020 20:13:57 -0500 Original-Received: by mail-yb1-xb30.google.com with SMTP id w127so5624033ybw.8 for ; Sat, 19 Dec 2020 17:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DOsHnMaGPm5wDzMHSHlkQ3tW5dDdEIbQE+XXZykHWxU=; b=BXth07I4g5jMznn4LDr4Of/bx8Ej0eZeg9IsLxM3ZIrfJssQhCZMe/xY+zjzA9fpr/ 7UYDhubBGbvwWuES+xfGHXE3kXfBD6eiG1KEgHEZMSTZNOcSNRlZa/6HZNnvGDClGk3t lzF1C+kUmzKIeq8lPeucrC33xBaJ9q+3Ow42iGzNGghnKWmXg2RLJXTMs7EbNhvASbTN d3uSCM8ypnJVkRwQwqzgoyBwytxoAPXPG1Iz66u926YZetVzaC0bPDwDQljg1VBmI+aM EncRJ+wsU+/SX2AZLJtbJ6sFJnXjExOY/HL8qI0MmncuywTluHwkYdxBFIvoSSNzdVtR /dYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DOsHnMaGPm5wDzMHSHlkQ3tW5dDdEIbQE+XXZykHWxU=; b=VvuZoPbelFLFh3IE8A2+o21oOXoLtkikczOeD8Z6bvYUSIGRoiefBnCrc/319vNPlQ BicPhR/+1oR0/AZqOTMlFd+RN69Wq9s0Y7F4huEV3F/kLHjjRzzzPx3ZJLgvDAaOOf8U QsnhIpF8ymVLUX4aT2FBy6RKPzwUW/TtglI2FzjBIL0fTAyBwFR+et8uAy7xjLaQjoiz crOwiDeLXNvHiw91Xaj3svS7YRMJrE5HU4yJUSES/wZme0B/7/PuSHmxRyGLEUSFoKNE AtuaaVnme4DIygf1anO+oFUtwe1ZGcwZEjrBjNa2vAs0785J622IDbdIGw3N61Lwhxzh HNuQ== X-Gm-Message-State: AOAM530/SNbxZP+5CfA4aRNyrc/WzO19ug62Sd9ZZkk/EJV1i9UKkxkW OhYIBWlG9NcDfC+5xHLWSpIgsx/UxAFZf9hB8yk= X-Google-Smtp-Source: ABdhPJzA1y/TqscVz5XeTKlUd2fj8TJ0DU4R/Wn3DB1vGWHyknz6SNr3wIMZZSy6FPcpTZjKwr/B5xOmdwT08uwdqlM= X-Received: by 2002:a25:8608:: with SMTP id y8mr14891005ybk.324.1608426831008; Sat, 19 Dec 2020 17:13:51 -0800 (PST) In-Reply-To: <87r1nlj03c.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::b30; envelope-from=hongyi.zhao@gmail.com; helo=mail-yb1-xb30.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126588 Archived-At: On Sat, Dec 19, 2020 at 11:19 PM Lars Ingebrigtsen wrote: > > William Xu writes: > > > I checked the page source in chrome or safari, they don't seem to have > > iso-8859-1 in the page, instead something like this: > > > > > name="btnK" type="submit" > > data-ved="0ahUKEwjD_5XP9NntAhWIBGMBHbV0BZUQ4dUDCAw"> > > Yes, Google serves out HTML that actually works if the User-Agent > indicates the major browsers. If you > > (setq url-user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36") > > that makes Google serve out HTML that's non-buggy. I confirm it does the trick for me too. > > > Also, if i copy and paste below url directly in safari or chrome, it > > would display the page correctly. > > > > http://www.google.com/search?gbv=1&iflsig=AINFCbYAAAAAX9eJ576dBCkZ_8MT30T-VWnLwzH6yNx4&bih=&biw=&source=hp&hl=no&ie=ISO-8859-1&btnG=Google-s%C3%B8k&q=+%E4%B8%AD%E6%96%87%E7%BD%91 > > > > On the other hand, when I just mouse-click from emacs, which calls > > browse-url, then safari will display the same garbage there, simlar to > > what OP posts. > > I see the same in Chrome whether I go via browse-url or paste the URL. Me too. > > > I wonder what browse-url is doing in between. > > > > Is browse-url also used by eww? > > No. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic Vocational and Technical University NO. 552 North Gangtie Road, Xingtai, China