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

build.cmd modifies the selected font of console #5828

Closed
BartoszKlonowski opened this issue Oct 22, 2020 · 5 comments
Closed

build.cmd modifies the selected font of console #5828

BartoszKlonowski opened this issue Oct 22, 2020 · 5 comments

Comments

@BartoszKlonowski
Copy link
Contributor

Issue Description

When launching the build.cmd (no matter if in cmd.exe or PowerShell) the font used for the console is changed to default used by powershell script.
As an example, having consolas font with size 14 selected:
obraz
it's changed to:
obraz

NOTE: due to Polish language selected by build.cmd I also have some errors in displaying words containing special characters (notice for example "okre lanie" and "przywrócenia"). Some are displayed incorrectly, some are just avoided.

Steps to Reproduce

  • Configure your console with custom font family and font size settings
  • Go to MSBuild project repository directory
  • Launch the build.cmd and observe the change

Expected Behavior

Console settings and font's style is kept and any output from build.cmd is printed with the customized settings and font.

Actual Behavior

Settings are changed and stay changed even after build.cmd exits.

Analysis

It looks like a problem with encoding, as this answer says.
The solution given in the mentioned answered solves the problem, but also forces the language to be english - it doesn't bother me, but if we want to keep the ability of build.cmd script to be displayed in various languages, then it's still needed to figure out better solution.

@BartoszKlonowski BartoszKlonowski added bug needs-triage Have yet to determine what bucket this goes in. labels Oct 22, 2020
@rainersigwald
Copy link
Member

Our build.cmd doesn't specify a codepage though; it's ANSI. This looks like an issue with PowerShell and the console host when the current codepage isn't ANSI. So I'm not sure there's anything we can do to implement a fix.

Does the same thing happen if you use the new Windows Terminal?

Does the same thing happen if you chcp 65001 instead of 437? That should allow Polish output.

@BartoszKlonowski
Copy link
Contributor Author

@rainersigwald Thank you!
Answering both questions:

Does the same thing happen if you use the new Windows Terminal?

No, when using Windows Terminal everything works well - translation is OK and settings are kept

Does the same thing happen if you chcp 65001 instead of 437?

chcp 65001 gives the same issue as with original build.cmd script - translation has missing/incorrect characters and settings are lost.

@benvillalobos
Copy link
Member

This issue might be related: microsoft/terminal#280

@benvillalobos benvillalobos removed the needs-triage Have yet to determine what bucket this goes in. label Nov 11, 2020
@benvillalobos
Copy link
Member

Team Triage: If anyone knows what we can do to fix this in our repo, we'd love to hear about it 🙂

@BartoszKlonowski
Copy link
Contributor Author

There are no comment for a few months now, and this is really a minor issue - I'll close this.
We can reopen this if anyone else will see this as worth spending the time.

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

4 participants