pub fn unicode_support_enabled() -> boolExpand description
Decide whether the terminal supports Unicode box-drawing characters.
Precedence (highest first):
CC_SWITCH_ASCII=1→ force ASCII (escape hatch for any terminal).CC_SWITCH_UNICODE=1→ force Unicode (escape hatch for Windows users on terminals our heuristic can’t detect).- On Windows: only enable Unicode if
WT_SESSIONis set (Windows Terminal). Default to ASCII to avoid mojibake on legacy conhost / CMD where the default codepage is not UTF-8. - On non-Windows: enabled by default. Modern Linux and macOS terminals
universally support UTF-8; the
CC_SWITCH_ASCII=1escape hatch above covers exceptions.