How to get unicodes from google translation output line

In google translate web site, if I find a word in English and choose any other foreign language, it shows the exact word in a foreign language. I want a unicode value for these foreign characters. How to get it?

+3
source share
1 answer

Select 1 character (for example, "香"), then enter it in the location bar:

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

then click 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"))
+2
source

Source: https://habr.com/ru/post/1738330/


All Articles