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

No way to setup the shell utf-8 encoding in windows. #32955

Closed
artem-leonov opened this issue Aug 22, 2017 · 3 comments
Closed

No way to setup the shell utf-8 encoding in windows. #32955

artem-leonov opened this issue Aug 22, 2017 · 3 comments
Assignees
Labels
tasks Task system issues

Comments

@artem-leonov
Copy link

artem-leonov commented Aug 22, 2017

  • VSCode Version: 1.15.0
  • OS Version: Windows 10 Pro 1703

I need to change shell encoding to utf-8, because default encoding not showing up cyrillic symbols. Only way to do this that I found is adding shell args as described in #19837. But when I use tasks with this workaround error happens. "Parameter format not correct - /d" for cmd and "Parameter format not correct - -Command" for powershell. There is no way to change shell encoding and use tasks both.

Steps to Reproduce:

  1. Setup "terminal.integrated.shellArgs.windows": ["-NoExit", "/c", "chcp 65001"] in configuration
  2. Run any task (E. g. build)

Reproduces without extensions: Yes

@vscodebot vscodebot bot added new release tasks Task system issues labels Aug 22, 2017
@dbaeumer dbaeumer added this to the On Deck milestone Aug 22, 2017
@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Aug 22, 2017
@verysimplenick
Copy link

For build tasks I use something like this

{
    "version": "0.1.0",
    "command": "cmd",
    "isShellCommand": true,
    "args": [],
    "tasks": [
        {
            "taskName": "build",
            "args": [
                "/C",
                "chcp 65001",
                "&&",
                "dotnet",
                "build",
                "${workspaceRoot}/NaturalBreaksClassification.csproj"
            ],
            "isBuildCommand": true,
            "problemMatcher": "$msCompile"
        }
    ]
}

@yumetodo
Copy link

yumetodo commented Sep 2, 2017

When I use git-bash from this terminal, as far as I know, there is also no way to set up as utf-8.

ref(ja-JP): https://teratail.com/questions/90822

@dbaeumer dbaeumer removed the feature-request Request for new features or functionality label Nov 9, 2017
@dbaeumer
Copy link
Member

dbaeumer commented Nov 9, 2017

With the new task runner that executes task in the terminal using a shell this got simplified a lot. Tips and tricks on how to control the encoding can be found here: https://github.com/Microsoft/vscode-docs/blob/vnext/docs/editor/tasks.md#changing-the-encoding-for-a-task-output

As explained there is not generic way how this can reasonably be solved for different OSes and shells.

@dbaeumer dbaeumer closed this as completed Nov 9, 2017
@dbaeumer dbaeumer removed this from the On Deck milestone Nov 9, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

5 participants