[Lldb-commits] [lldb] [lldb][windows] force the console to use a UTF-8 codepage (PR #149493)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 18 04:17:49 PDT 2025


charles-zablit wrote:

> I opened an issue for this #142568.
> 
> Where @Nerixyz mentions that SetConsoleOutputCP might have problems in cmd.exe (which probably means conhost, the original windows terminal host, as opposed to "windows terminal", the new one).

>From my understanding, the [original issue](https://github.com/jqlang/jq/issues/1121#issue-145089142) in jq is that they did not reset the codepage after the program had exited. My patch does reset it if lldb gracefully exits.

The `/utf-8` approach seems promising as well but I find it suspicious that no other project uses it.

Another temporary fix for this while we figure out a long term solution could be to force the use of the ANSI characters on windows.

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


More information about the lldb-commits mailing list