Open GrayArashiAI opened 1 year ago
I've encountered the same issue too. Is there a solution available now?
I've encountered the same issue too. Is there a solution available now?
+1
I the garbled test outputted by the debuggee? In which case I am not sure this is related to codelldb - it asks vscode to create a terminal, then connects debuggee output to that terminal. It is not directly involved in outputting to the terminal after that.
OS: Windows10 x64 VSCode version: 1.83.1 x64 CodeLLDB version: v1.10.0 Compiler: rustc 1.73.0 (cc66ad468 2023-10-03) Debuggee: x86_64-windows-msvc
Problem: When using the CodeLLDB plugin to debug Rust code, the characters in the terminal, such as Japanese and Chinese characters, are displayed as garbled text. My computer's environment is set to Shift-JIS, but I have configured VSCode with the default encoding as UTF-8. In a typical scenario, the CodeLLDB plugin should use the encoding specified in VSCode since it is an extension for VSCode, and the terminal runs within VSCode. However, it appears that CodeLLDB is not using the default encoding set in VSCode and is instead using the encoding from my Windows environment. This results in garbled text in the terminal.
Steps to Reproduce:
Set the system's encoding to Shift-JIS. Configure VSCode to use UTF-8 as the default encoding. Create or open a Rust project in VSCode with Japanese/Chinese Print out. Observe that the terminal displays garbled text for non-ASCII characters.
Example Code:
Expected Behavior: The CodeLLDB plugin should respect the default encoding set in VSCode and display characters correctly in the terminal. This is how it executed with rust-analyzer:
Actual Behavior: CodeLLDB appears to use the system's encoding instead of the VSCode default encoding, resulting in garbled text in the terminal.