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?
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/' => '👋',
'</3' => '💔',
'<3' => '💗',
'8-D' => '😁',
'8D' => '😁',
':-D' => '😁',
'=-3' => '😁',
'=-D' => '😁',
'=3' => '😁',
'=D' => '😁',
'B^D' => '😁',
'X-D' => '😁',
'XD' => '😁',
'x-D' => '😁',
'xD' => '😁',
':\')' => '😂',
':\'-)' => '😂',
':-))' => '😃',
'8)' => '😄',
':)' => '😄',
':-)' => '😄',
':3' => '😄',
':D' => '😄',
':]' => '😄',
':^)' => '😄',
':c)' => '😄',
':o)' => '😄',
':}' => '😄',
':っ)' => '😄',
'=)' => '😄',
'=]' => '😄',
'0:)' => '😇',
'0:-)' => '😇',
'0:-3' => '😇',
'0:3' => '😇',
'0;^)' => '😇',
'O:-)' => '😇',
'3:)' => '😈',
'3:-)' => '😈',
'}:)' => '😈',
'}:-)' => '😈',
'*)' => '😉',
'*-)' => '😉',
':-,' => '😉',
';)' => '😉',
';-)' => '😉',
';-]' => '😉',
';D' => '😉',
';]' => '😉',
';^)' => '😉',
':-|' => '😐',
':|' => '😐',
':(' => '😒',
':-(' => '😒',
':-<' => '😒',
':-[' => '😒',
':-c' => '😒',
':<' => '😒',
':[' => '😒',
':c' => '😒',
':{' => '😒',
':っC' => '😒',
'%)' => '😖',
'%-)' => '😖',
':-P' => '😜',
':-b' => '😜',
':-p' => '😜',
':-Þ' => '😜',
':-þ' => '😜',
':P' => '😜',
':b' => '😜',
':p' => '😜',
':Þ' => '😜',
':þ' => '😜',
';(' => '😜',
'=p' => '😜',
'X-P' => '😜',
'XP' => '😜',
'd:' => '😜',
'x-p' => '😜',
'xp' => '😜',
':-||' => '😠',
':@' => '😠',
':-.' => '😡',
':-/' => '😡',
':/' => '😡',
':L' => '😡',
':S' => '😡',
':\\' => '😡',
'=/' => '😡',
'=L' => '😡',
'=\\' => '😡',
':\'(' => '😢',
':\'-(' => '😢',
'^5' => '😤',
'^<_<' => '😤',
'o/\\o' => '😤',
'|-O' => '😫',
'|;-)' => '😫',
':###..' => '😰',
':-###..' => '😰',
'D-\':' => '😱',
'D8' => '😱',
'D:' => '😱',
'D:<' => '😱',
'D;' => '😱',
'D=' => '😱',
'DX' => '😱',
'v.v' => '😱',
'8-0' => '😲',
':-O' => '😲',
':-o' => '😲',
':O' => '😲',
':o' => '😲',
'O-O' => '😲',
'O_O' => '😲',
'O_o' => '😲',
'o-o' => '😲',
'o_O' => '😲',
'o_o' => '😲',
':$' => '😳',
'#-)' => '😵',
':#' => '😶',
':&' => '😶',
':-#' => '😶',
':-&' => '😶',
':-X' => '😶',
':X' => '😶',
':-J' => '😼',
':*' => '😽',
':^*' => '😽',
'ಠ_ಠ' => '🙅',
'*\\0/*' => '🙆',
'\\o/' => '🙆',
':>' => '😄',
'>.<' => '😡',
'>:(' => '😠',
'>:)' => '😈',
'>:-)' => '😈',
'>:/' => '😡',
'>:O' => '😲',
'>:P' => '😜',
'>:[' => '😒',
'>:\\' => '😡',
'>;)' => '😈',
'>_>^' => '😤',
I used Name is carl links to generate this list:
{
,:(: "😓",
,:): "😅",
,:-(: "😓",
,:-): "😅",
0:): "😇",
0:-): "😇",
8-): "😎",
:"): "😊",
:$: "😒",
:'(: "😢",
:'): "😂",
:'-(: "😢",
:'-): "😂",
:'-D: "😂",
:'D: "😂",
:(: "😦",
:): "😃",
:*: "😗",
:,'(: "😭",
:,'-(: "😭",
:,(: "😢",
:,): "😂",
:,-(: "😢",
:,-): "😂",
:,-D: "😂",
:,D: "😂",
:-"): "😊",
:-$: "😒",
:-(: "😦",
:-): "😃",
:-*: "😗",
:-/: "😕",
:-@: "😡",
:-D: "😄",
:-o: "😮",
:-O: "😮",
:-P: "😛",
:-S: "😒",
:-Z: "😒",
:-|: "😐",
:/: "😕",
:@: "😡",
:D: "😄",
:o: "😮",
:O: "😮",
:P: "😛",
:s: "😒",
:z: "😒",
:|: "😐",
;(: "😭",
;): "😉",
;-(: "😭",
;-): "😉",
]:): "😈",
]:-): "😈",
B-): "😎",
o:): "😇",
O:): "😇",
O:-): "😇",
o:-): "😇",
X-): "😆",
x-): "😆"
}
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: [ ';)', ';-)' ]
};
来源:https://stackoverflow.com/questions/29488143/is-there-an-equivalence-table-to-convert-ascii-smileys-to-unicode-emojis