开发者

How to get unicodes from Google translation output string

开发者 https://www.devze.com 2022-12-25 00:24 出处:网络
In google translate web s开发者_高级运维ite if i type any word in English and select any other foreign language, it show the exact word in the foreign language. I want the unicode value of that foreig

In google translate web s开发者_高级运维ite if i type any word in English and select any other foreign language, it show the exact word in the foreign language. I want the unicode value of that foreign characters. How to get that?


Select 1 character (e.g. "香") then type this into the location bar:

javascript:alert("香".charCodeAt(0).toString(16))

then press Enter.


You can also use this bookmarklet:

javascript:var%20s=window.getSelection().toString(),t=[];for(var l=0;l<s.length;++l)t.push(s.charAt(l)+"="+s.charCodeAt(l).toString(16));alert(t.join("\n"))
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号