Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the encoding of the integrated terminal #227

Open
FallenYing opened this issue Aug 23, 2023 · 0 comments
Open

change the encoding of the integrated terminal #227

FallenYing opened this issue Aug 23, 2023 · 0 comments

Comments

@FallenYing
Copy link

FallenYing commented Aug 23, 2023

Hi and thanks for this plugin. I'm also using the Terminus plugin at the same time. It has greatly improved my sublime text experience!

I am using windows platform. I configured the debugger so that it would run. But soon I ran into some problems.

My code is encoded in utf-8, and in my own build system I can specify the output of the terminal by adding chcp 65001. But when I use the plugin's lldb adapter for debugging, the encoding of the calling terminal is not utf-8, which leads to garbled code.🤕

This is the relevant configuration for my debugger plugin

"debugger_tasks": [
		{
			"name": "CompileWithClang",
			"working_dir": "${file_path}",
			"shell_cmd": "clang++ -std=c++11 -g '${file}' -o '${file_path}/../bin/${file_base_name}'",
			"file_regex": "(..[^:]*):([0-9]+):([0-9]+)?:? error: (.*)",
		},
	],

I tried adding chcp 65001 to "shell_cmd" but it doesn't seem to work.

"debugger_configurations": [
		{
			"name": "C++ LLDB (Terminus)",
			"type": "lldb",
			"request": "launch",
			"pre_debug_task": "CompileWithClang",
			"program": "${file_path}/../bin/${file_base_name}",
			"cwd": "${project_path}",
			"terminal": "integrated",
		},
	],

I tried modifying the Terminus plugin settings and a few other things, but it doesn't work.
Even adding system("chcp 65001") to my code I want to debug doesn't change the encoding type of the terminal.

Here's the configuration of my Terminus plugin

"shell_configs": [
        {
            "name": "Command Prompt",
            "cmd": ["cmd.exe", "/k", "chcp 65001"],
            "env": {},
            "enable": true,
            "platforms": ["windows"]
        },
    ]

I'd like to inquire about how I can modify my settings to change the encoding type of the integrated terminal.🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant