[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 06:12:12 PDT 2025
charles-zablit wrote:
>From my understanding of the thread you linked, there are 3 ways to approach this:
1. Switch to ASCII characters on Windows instead of the `"╰"` character. This is by far the easiest way to fix this specific rendering issue, but does not address the root issue. Debugging a program with non ASCII characters will break.
2. Set the code page when lldb starts. Reset the codepage when it exits. This used to be a no-go because it would cause some resizing in `CMD.exe`, but that was over 6 years ago. Terminal is [the default console in Windows 11 as of 2022](https://www.bleepingcomputer.com/news/microsoft/windows-terminal-is-now-the-default-windows-11-22h2-console/).
3. Use `/execution-charset:utf-8` as @Nerixyz suggested. I will start a build of lldb with this change. If this does not have the same problems as manually setting the code page, this sounds like the most appealing solution.
4. (bonus) Go the Python way and have a wrapper, which would properly address the issue. This was talked about in the thread but was not deemed realistic. https://peps.python.org/pep-0528/#add-io-windowsconsoleio
https://github.com/llvm/llvm-project/pull/149493
More information about the lldb-commits
mailing list