I would like to find a table to convert the old school western ascii emoticons :-) into their modern unicode equivalent ☺.
Do you know if there is one?
Found in the code of markdown-it (license MIT)
module.exports = {
mad: [ '>:(', '>:-(' ], // angry
blush: [ ':")', ':-")' ],
broken_heart: [ '</3', '<\\3' ],
// :/ & :\ disabled due conflicts, untill logic improved
confused: [ /*':\\',*/ ':-\\', /*':/',*/ ':-/' ], // twemoji shows question
cry: [ ":'(", ":'-(", ':,(', ':,-(' ],
frowning: [ ':(', ':-(' ],
heart: [ '<3' ],
imp: [ ']:(', ']:-(' ],
innocent: [ 'o:)', 'O:)', 'o:-)', 'O:-)', '0:)', '0:-)' ],
joy: [ ":')", ":'-)", ':,)', ':,-)', ":'D", ":'-D", ':,D', ':,-D' ],
kissing: [ ':*', ':-*' ],
laughing: [ 'x-)', 'X-)' ],
neutral_face: [ ':|', ':-|' ],
open_mouth: [ ':o', ':-o', ':O', ':-O' ],
rage: [ ':@', ':-@' ],
smile: [ ':D', ':-D' ],
smiley: [ ':)', ':-)' ],
smiling_imp: [ ']:)', ']:-)' ],
sob: [ ":,'(", ":,'-(", ';(', ';-(' ],
stuck_out_tongue: [ ':P', ':-P' ],
sunglasses: [ '8-)', 'B-)' ],
sweat: [ ',:(', ',:-(' ],
sweat_smile: [ ',:)', ',:-)' ],
unamused: [ ':s', ':-S', ':z', ':-Z', ':$', ':-$' ],
wink: [ ';)', ';-)' ]
};
Have a look at emoticon Info on ASCII emoticons. :p https://github.com/wooorm/emoticon/blob/master/index.json
Not everyone agrees on what is what, but here is one such possible table mapping input ASCII-art emoticons to Unicode emoji. Both data elements are single quoted, so backslashes and single quotes are escaped.
'o/' => '
I used Name is carl links to generate this list:
{
,:(: "