mandarin-english dictionary with unicode
April 25, 2011 11:17 PM Subscribe
Looking for chinese english dictionary with unicode code points
I want to be able to type in an english word and the chinese unicode codepoint is returned along with its pinyin character.
I want to be able to type in an english word and the chinese unicode codepoint is returned along with its pinyin character.
Best answer: Okay, copy pasting is boring, so I wrote you a greasemonkey script for that site (click here!). The code is:
posted by beerbajay at 5:26 AM on April 26, 2011
// ==UserScript== // @name chinese to unicode codepoint // @namespace BEERBAJAY // @include http://www.mandarintools.com/cgi-bin/wordlook.pl* // @require https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js // ==/UserScript== $(document).ready(function(){ $('tr[bgcolor="lightblue"]>td:lt(2)').each(function(){ var str = $(this).text().trim(); var result = " ("; for(var i=0; iif(i > 0) result += " "; result += "U+" + str.charCodeAt(i).toString(16); } result += ")"; $(this).append(result); }); });
posted by beerbajay at 5:26 AM on April 26, 2011
Response by poster: I'm using Chrome but looks like I'll fire up firefox just for this. Thanks @beerbajay
posted by lahersedor at 4:48 AM on April 27, 2011
posted by lahersedor at 4:48 AM on April 27, 2011
Chrome should support greasemonkey userscripts. (not tested)
posted by beerbajay at 6:59 AM on April 27, 2011
posted by beerbajay at 6:59 AM on April 27, 2011
This thread is closed to new comments.
posted by beerbajay at 3:43 AM on April 26, 2011