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

Possibility to adjust ProcessStartInfo #189

Closed
bernd5 opened this issue Jan 16, 2023 · 1 comment
Closed

Possibility to adjust ProcessStartInfo #189

bernd5 opened this issue Jan 16, 2023 · 1 comment

Comments

@bernd5
Copy link

bernd5 commented Jan 16, 2023

Details

Some applications like dotnet query the "standard output encoding" before writing to std out.

Without changing the console encoding - unsupported charaters are replaced with "?". Reading that e.g. with Utf8 Encoding does not help.

To change the console code page a custom encoding can be used via ProcessStartInfo. Therefore it would be great if CreateStartInfo() could become protected virtual. Another alternative would be an ExecuteAsync overload with an ProcessStartInfo adjustment delegate like:

public delegate void AdjustStartInfo(ref ProcessStartInfo info);

On windows there is a "Change code page utility (chcp)". So a command could be changed to "cmd /c chcp 65001 >NUL && REAL_COMMAND". But this is quite ugly.

@bernd5
Copy link
Author

bernd5 commented Jan 16, 2023

See: #63

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

No branches or pull requests

2 participants