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

Tasks should support specifying the output encoding #3550

Closed
DongkunLee opened this issue Feb 29, 2016 · 17 comments
Closed

Tasks should support specifying the output encoding #3550

DongkunLee opened this issue Feb 29, 2016 · 17 comments
Assignees
Labels
tasks Task system issues
Milestone

Comments

@DongkunLee
Copy link

I think it's related to some global language problem.

The output message is broken like this

'luac'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ�
��ġ ������ �ƴմϴ�.

P.S> My environment is Win10 Ko(Korean version)

https://onedrive.live.com/redir?resid=73F0A5AA67A0D48F!212183&authkey=!ACjcDNvjj7PjRmY&v=3&ithint=photo%2cpng

@joaomoreno
Copy link
Member

For sure we're blindly converting to/from utf8 somewhere...

@bpasero bpasero assigned dbaeumer and unassigned bpasero Mar 1, 2016
@dbaeumer dbaeumer changed the title Can't see output error message Tasks should support specifying the output encoding Mar 1, 2016
@dbaeumer dbaeumer added tasks Task system issues feature-request Request for new features or functionality labels Mar 1, 2016
@dbaeumer dbaeumer added this to the Backlog milestone Mar 1, 2016
@f111fei
Copy link
Contributor

f111fei commented Jul 14, 2016

+1 . hope to fix as soon as possible

@shikouzhong
Copy link

+2. It's really a boring bug, hope to get it down in the next release version. 🎱
Now I use the internal console instead of tasks. :-(

@dbaeumer
Copy link
Member

Please see #15179. The idea here to move forward is to execute tasks in the terminal instead in its own output channel.

@eqr
Copy link

eqr commented Nov 20, 2016

Have the same problem Win10/Russian MsBuild. Really annoying.

@dbaeumer
Copy link
Member

Agree. The plan forward here is to use the integrated terminal to run tasks. This will make this work and even support input and ANSI control characters

@hia3
Copy link

hia3 commented Jan 3, 2017

Why is it a "feature-request"? Not garbling an output is not a feature. I think it should be "bug" and "important".

@eternalphane
Copy link
Contributor

In tasks.json:
use

"command": "cmd",
"args": ["/c chcp 65001 >nul && mingw32-make"]

instead of

"command": "mingw32-make"

and everything seems to work fine.

compiling...
main.cpp
e:\projects\c++\vscode_test\main.cpp(247): error C2143: 语法错误: 缺少“;”(在“return”的前面)
mingw32-make: *** [main.obj] Error 2
Makefile:37: recipe for target 'main.obj' failed

@dbaeumer
Copy link
Member

@eternalphane thanks for this. Actually I am working on support for running tasks in the integrated terminal which should make the encoding problem go away.

@gyuhyeon
Copy link

@dbaeumer update on this feature would be much appreciated. Not being able to figure out what the error message is makes the task feature almost unusable, thanks.

@dbaeumer
Copy link
Member

@gyuhyeon this will be addressed by using the terminal as the execution engine for tasks. You can alreadz opt into using the terminal by adding "runner": "terminal" to your tasks.json

@rajannpatel
Copy link

"runner":"terminal" does not appear to work anymore, I have had success setting the ENV before my command. I am on a Mac.

I was trying to run Jekyll.

"command": "export LANG=en_US.UTF-8 && export LC_ALL=en_US.UTF-8 && jekyll serve --watch"

@dbaeumer
Copy link
Member

@rajannpatel strange, "runner": "terminal" is still supported. You can also switch to tasks version 2.0.0. Can you provide a tasks.json file which demonstrates the behavior.

@doggy8088
Copy link

I have a workaround for this issue here:
https://gist.github.com/doggy8088/ca1dd1fff42e0dd4f0ce175a460feae5/revisions

@srgmatveev
Copy link

Thanks!
export LC_ALL=en_US.UTF-8 (for Russian export LC_ALL=ru_RU.UTF-8) helped me on Debian Linux added in file .bashrc

@dbaeumer
Copy link
Member

dbaeumer commented Nov 3, 2017

[Addressed in new terminal runner]

In the new terminal runner with can be controlled by configuring the shell to be used in the tasks.json. This allows to control the encoding.

@dbaeumer
Copy link
Member

I am closing this issue since this can now be control using normal Terminal setups in task 2.0.0. I also wrote some doc explaining how this is best used here: https://github.com/Microsoft/vscode-docs/blob/vnext/docs/editor/tasks.md#changing-the-encoding-for-a-task-output

I will close the issue. Please reopen a new issue against the current support if it is not satisfactory for you.

@dbaeumer dbaeumer removed the feature-request Request for new features or functionality label Nov 10, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 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