Skip to content

Conversation

@chunqingchen
Copy link
Contributor

Fix issue #2909

I haven't included a test case with this fix because

  1. unicode issue is better to be judged by eye.
  2. this issue only repros in a non-english windows system with ps running under cmd window. Our current test environment won't touch this scenario.

Thus, one time manual verification might be enough.

Summary of the issue:

Under non-english OS, if user start ps core under comandline and type "help ", the output will be one character per line

Root cause of the issue:
Only Nano needs to use Unicode, but Windows and Linux need the default encoding. The way we judge if the current os is Nano server has been outdated.
Fix:
Update the condition we use to judge nano server.

@chunqingchen chunqingchen changed the title Redefine the unicode output condition for nanoserver for more function Redefine the unicode output condition for nanoserver for "more" function Jun 22, 2017
@chunqingchen chunqingchen requested a review from daxian-dbw June 22, 2017 19:10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such variable $IsNanoServer in powershell core.
You need to look at [System.Management.Automation.Platform]::IsIoT and [System.Management.Automation.Platform]::IsNanoServer

@daxian-dbw
Copy link
Member

I still would like to have a test for this fix. If it's really impossible, can you please at least have a screenshot to show the behavior difference before and after the fix?

@chunqingchen
Copy link
Contributor Author

Before the fix:
image

After the fix:
image

@chunqingchen
Copy link
Contributor Author

@daxian-dbw thanks! the comment has been resolved and the screenshots are attached.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to check [System.Management.Automation.Platform]::IsIoT. IoT is very similar to NanoServer.

@chunqingchen
Copy link
Contributor Author

@daxian-dbw resolved

@daxian-dbw daxian-dbw merged commit ede3aec into PowerShell:master Aug 16, 2017
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

Successfully merging this pull request may close these issues.

3 participants