================
@@ -472,3 +472,18 @@ bool TerminalState::TTYStateIsValid() const { return
bool(m_data); }
bool TerminalState::ProcessGroupIsValid() const {
return static_cast<int32_t>(m_process_group) != -1;
}
+
+bool TerminalSupportsUnicode() {
+ static std::optional<bool> result;
+ if (result)
+ return result.value();
+#ifndef _WIN32
+ if (const char *lang_var = std::getenv("LANG"))
+ result = std::string(lang_var).find("UTF-8");
+ else
+ result = false;
+#else
+ result = std::getenv("WT_SESSION") != nullptr;
----------------
DavidSpickett wrote:
I would invert the condition and swap the code so you have:
```
#ifdef _WIN32
...
#else
linux stuff
```
I find that easier to read.
https://github.com/llvm/llvm-project/pull/168603
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits