[Lldb-commits] [lldb] [llvm] [lldb] improve the heuristics for checking if a terminal supports Unicode (PR #168603)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 19 09:52:27 PST 2025
================
@@ -97,12 +99,8 @@ void RenderDiagnosticDetails(Stream &stream,
return;
}
- // Since there is no other way to find this out, use the color
- // attribute as a proxy for whether the terminal supports Unicode
- // characters. In the future it might make sense to move this into
- // Host so it can be customized for a specific platform.
llvm::StringRef cursor, underline, vbar, joint, hbar, spacer;
- if (stream.AsRawOstream().colors_enabled()) {
+ if (TerminalSupportsUnicode()) {
----------------
adrian-prantl wrote:
Can you just double-check that, for example, https://lldb.llvm.org/cpp_reference/classlldb_1_1SBCommandReturnObject.html#aa655d205a4ebafb610458fe88068d333 is unaffected by this change? IIRC, the structured error data bypasses this function entirely, but I want to make sure there are no unintended side effects.
https://github.com/llvm/llvm-project/pull/168603
More information about the lldb-commits
mailing list