def detect_unicode_support():
result = None<EOL>if env.LANG and env.LANG.endswith('<STR_LIT>'):  <EOL><INDENT>result = True<EOL><DEDENT>elif is_a_tty():<EOL><INDENT>if os_name == '<STR_LIT>':<EOL><INDENT>from .windows import get_position as _get_position<EOL><DEDENT>else:<EOL><INDENT>_get_position = get_position<EOL><DEDENT>out = sys.stdout<EOL>x, _ = _get_position()<EOL>out.write('<STR_LIT>')<EOL>out.flush()<EOL>x2, _ = _get_position()<EOL>difference = x2 - x<EOL>if difference == <NUM_LIT:1>:<EOL><INDENT>result = True<EOL><DEDENT>else:<EOL><INDENT>result = False  <EOL><DEDENT>out.write(BS)<EOL>out.flush()<EOL><DEDENT>return result<EOL>
Try to detect unicode (utf8?) support in the terminal.

        Experimental, implementation idea is from the link below:
           https://unix.stackexchange.com/questions/184345/detect-how-much-of-unicode-my-terminal-supports-even-through-screen

        TODO:
            needs improvement.
            # should return None or True on redirection?

        Returns:
            Boolean | None if not a TTY