for example, this one contains Korean
https://weixin.sogou.com/weixin?type=2&ie=utf-8&s_from=hotnews&query=.
Vietnamese:
https://weixin.sogou.com/weixin?type=2&ie=utf-8&s_from=hotnews&query=Ti
I need to judge that if the URL does not contain text, then I do not need encodeURIComponent processing.
if it contains text, it is processed with encodeURIComponent. But how to judge whether it contains these words is a problem. Most of them just find out how to judge Chinese on the Internet.
I found that I really asked a stupid question. Just use the function encodeURI directly, such as
.
url = encodeURI(url);