GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Redefine the unicode output condition for nanoserver for "more" function by chunqingchen · Pull Request #4074 · PowerShell/PowerShell

Conversation

@chunqingchen

@chunqingchen Chunqing Chen (chunqingchen) commented Jun 22, 2017

Copy link
Copy Markdown
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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Jun 22, 2017
@chunqingchen Chunqing Chen (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
Chunqing Chen (chunqingchen) requested a review from Dongbo Wang (daxian-dbw) June 22, 2017 19:10
daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jun 23, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Jun 23, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Jun 23, 2017

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mirichmo Mike Richmond (mirichmo) assigned Dongbo Wang (daxian-dbw) Jun 28, 2017
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix0 branch from ee8e836 to cba6d60 Compare July 25, 2017 05:05
@chunqingchen

Chunqing Chen (chunqingchen) commented Jul 25, 2017

Copy link
Copy Markdown
Contributor Author

Before the fix:
image

After the fix:
image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chunqingchen

Chunqing Chen (chunqingchen) commented Jul 25, 2017

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jul 25, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Jul 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chunqingchen
Redefine the unicode output condition for nanoserver for more function
60acc0d
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix0 branch from cba6d60 to 60acc0d Compare August 15, 2017 17:57
@chunqingchen

Chunqing Chen (chunqingchen) commented Aug 15, 2017

Copy link
Copy Markdown
Contributor Author

Dongbo Wang (@daxian-dbw) resolved

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Aug 15, 2017
View reviewed changes
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit ede3aec into PowerShell:master Aug 16, 2017
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@chunqingchen @daxian-dbw
Redefine the unicode output condition for nanoserver/IoT for more fun…
3e60ffe
…ction (PowerShell#4074)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chunqingchen @daxian-dbw @msftclas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.