From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: Eww can't display Chinese characters correctly. Date: Sat, 19 Dec 2020 12:35:48 +0100 Organization: the Church of Emacs Message-ID: References: <87sg88xza8.fsf@codeisgreat.org> <87tuso30wh.fsf@gnus.org> <87lfe0307l.fsf@gnus.org> <877dpk2ysn.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27990"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:thz9pL4kYgF5sSJ2Q6u26ss89QM= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 12:37:27 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 1kqaYA-0007Aq-5H for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 12:37:26 +0100 Original-Received: from localhost ([::1]:46264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqaY9-00020Y-8M for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 06:37:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqaWi-0001D4-HY for help-gnu-emacs@gnu.org; Sat, 19 Dec 2020 06:35:56 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:49962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqaWh-0003fh-0e for help-gnu-emacs@gnu.org; Sat, 19 Dec 2020 06:35:56 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kqaWe-0005af-OU for help-gnu-emacs@gnu.org; Sat, 19 Dec 2020 12:35:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:126569 Archived-At: Lars Ingebrigtsen writes: > Stefan Monnier writes: > >> Could be, but it could also be that the request made by Eww doesn't >> correctly specify the encoding of the "中文网" string, so that Google is >> then lead to believe we're using iso-8859-1? > > Nope. Google puts this in the form: > > > > I'm assuming they then have some JS to magically make this work. 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: 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 wonder what browse-url is doing in between. Is browse-url also used by eww? -- William