[Lldb-commits] [lldb] [lldb] improve the heuristics for checking if a terminal supports Unicode (PR #168603)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 19 04:12:36 PST 2025


charles-zablit wrote:

> I'd like a citation for the WT_SESSION variable.
> 
> And it is a bit worrying that one of the top results for that name is one of the Windows Terminal devs (I'm pretty sure they are) telling a project not to use it [Textualize/rich#140](https://github.com/Textualize/rich/issues/140).

I used what [`is-unicode-supported`](https://www.npmjs.com/package/is-unicode-supported) uses, which is a very (50M weekly downloads/week) popular NPM package: https://github.com/sindresorhus/is-unicode-supported/blob/e0373335038856c63034c8eef6ac43ee3827a601/index.js#L11 

After some additional testing, both Windows Terminal and Windows Console Host display unicode correctly in lldb. This is on Windows 11, not sure how this works on 10 and earlier. We use `WriteConsoleW` since https://github.com/llvm/llvm-project/pull/156469, so maybe the Windows code path should always return `true` instead of checking for the `WT_SESSION` env var?


https://github.com/llvm/llvm-project/pull/168603


More information about the lldb-commits mailing list