Is there an equivalence table to convert ASCII smi

2020-03-19 02:46发布

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?

3条回答
Deceive 欺骗
2楼-- · 2020-03-19 03:13

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楼-- · 2020-03-19 03:15

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:             [ ';)', ';-)' ]
};
查看更多
ら.Afraid
4楼-- · 2020-03-19 03:21

I used Name is carl links to generate this list:

{ ,:(: "

查看更多
登录 后发表回答