Skip

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.
posted by lahersedor to Writing & Language (4 answers total)
 
The first hit for "mandarin english dictionary" returns the following site, where a search for "cat" looks like this. There's no written-out unicode codepoint, but you can easily copy the character and paste it in, for example, here.
posted by beerbajay at 3:43 AM on April 26, 2011


Okay, copy pasting is boring, so I wrote you a greasemonkey script for that site (click here!). The code is:
// ==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; i
                if(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


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


Chrome should support greasemonkey userscripts. (not tested)
posted by beerbajay at 6:59 AM on April 27, 2011


« Older What do you say to friends or ...   |  Someone I don't like has asked... Newer »
This thread is closed to new comments.


Post