unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: William Xu <william.xwl@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Eww can't display Chinese characters correctly.
Date: Sat, 19 Dec 2020 16:18:31 +0100	[thread overview]
Message-ID: <87r1nlj03c.fsf@gnus.org> (raw)
In-Reply-To: <m2tusihvu3.fsf@gmail.com> (William Xu's message of "Sat, 19 Dec 2020 12:35:48 +0100")

William Xu <william.xwl@gmail.com> 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: 
>
> <input class="gNO89b" value="Google Search" aria-label="Google Search"
> 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.

> 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.

> 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



  reply	other threads:[~2020-12-19 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  3:30 Eww can't display Chinese characters correctly Hongyi Zhao
2020-12-14 14:01 ` Pankaj Jangid
2020-12-14 14:38   ` Hongyi Zhao
2020-12-14 14:41   ` Lars Ingebrigtsen
2020-12-14 14:48     ` Hongyi Zhao
2020-12-14 14:56       ` Lars Ingebrigtsen
2020-12-14 15:19         ` Stefan Monnier
2020-12-14 15:27           ` Lars Ingebrigtsen
2020-12-19 11:35             ` William Xu
2020-12-19 15:18               ` Lars Ingebrigtsen [this message]
2020-12-19 18:27                 ` William Xu
2020-12-20  1:13                 ` Hongyi Zhao
2020-12-14 18:59         ` Tomas Nordin
2020-12-14 23:22         ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1nlj03c.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=william.xwl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).