help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eww can't display Chinese characters correctly.


From: William Xu
Subject: Re: Eww can't display Chinese characters correctly.
Date: Sat, 19 Dec 2020 19:27:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> William Xu <william.xwl@gmail.com> writes:
>
> 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.

Thanks, this works for me too. I guess I should add this to my .emacs. :)

>> 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 look into the browse-url implementation, if I call the same command
line ("open URL"), the same garbage will be shown in Safari.

So it is something happening in the Safari.  Somehow when it is pasted
in the address bar Safari, it has converted the pasted url into below:

https://www.google.com/search?client=safari&rls=en&q=%E4%B8%AD%E6%96%87%E7%BD%91&ie=UTF-8&oe=UTF-8

The same trick doesn't work for Chrome. 

-- 
William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]