开发者

How to get unicodes from Google translation output string

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜