3

Based on this answer, I hoped that the following would work:

# Is emoji supported by the terminal?
function is_emoji_supported {
  [ "$(echo -ne '\xE0\xA5\xA5' | wc -m)" -eq 1 ]
}

I'm guessing that this doesn't work because wc never looks at the terminal's view of characters, but rather LC_*.

Is there a (ideally POSIX) way of determining whether the terminal purports to support emoji?

Tom Hale
  • 30,455

0 Answers0