Skip to content

Conversation

@jborean93
Copy link
Contributor

@jborean93 jborean93 commented Feb 14, 2024

PR Summary

Documents the new variable $PSApplicationOutputEncoding which is used to control the encoding PowerShell uses when reading output from an external application.

This also removes the example for $OutputEncoding as it is wrong. The $OutputEncoding variable is only used as the encoding that PowerShell writes data through the external application's stdin pipe. The command line is always a string on Windows/Linux/macOS so is unaffected by this option.

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

@learn-build-service-prod

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@jborean93
Copy link
Contributor Author

jborean93 commented Feb 14, 2024

Depending on what happens with #10877, I might just revert the changes to $OutputEncoding here in favour of that PR and keep this focused on the new proposed variable.

Edit: PR has been merged so I've rebased the changes here.

@sdwheeler sdwheeler added hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release labels Feb 14, 2024
@jborean93 jborean93 force-pushed the PSApplicationOutputEncoding branch from b55f4ce to c1a3390 Compare February 14, 2024 20:00
@learn-build-service-prod

This comment was marked as outdated.

@jborean93 jborean93 force-pushed the PSApplicationOutputEncoding branch from c1a3390 to bfb0a36 Compare February 14, 2024 20:04
@learn-build-service-prod

This comment was marked as outdated.

@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from bfb0a36 to 49de1d1 Compare March 2, 2024 15:40
@learn-build-service-prod

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@sdwheeler sdwheeler added this to the Future milestone May 9, 2024
@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from 49de1d1 to 823964e Compare May 16, 2024 20:17
@learn-build-service-prod

This comment was marked as off-topic.

@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from 823964e to fababe9 Compare August 12, 2024 13:26
@learn-build-service-prod

This comment was marked as outdated.

@learn-build-service-prod

This comment was marked as outdated.

@sdwheeler
Copy link
Collaborator

This change is not going to make it into 7.5. Closing this PR. We can reopen it if the change gets merged in a future release.

@sdwheeler sdwheeler closed this Nov 22, 2024
@jborean93
Copy link
Contributor Author

@sdwheeler, any chance we can re-open this PR now that PowerShell/PowerShell#21219 has been merged?

@sdwheeler sdwheeler reopened this Oct 21, 2025
@learn-build-service-prod

This comment was marked as outdated.

@sdwheeler
Copy link
Collaborator

@jborean93 Thanks for the notification. I will rebase and take a look.

@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from 3f29267 to 2552059 Compare October 21, 2025 13:30
@sdwheeler sdwheeler removed the hold-for-pr Waiting - for PR merge label Oct 21, 2025
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 2552059:

✅ Validation status: passed

File Status Preview URL Details
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md ✅Succeeded View (powershell-7.5)
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from 2552059 to 527a18e Compare October 21, 2025 13:59
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 527a18e:

✅ Validation status: passed

File Status Preview URL Details
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md ✅Succeeded View (powershell-7.5)
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@sdwheeler
Copy link
Collaborator

Merge is pending release. Don't know if this is going into the next release of 7.6 or 7.5 (or both).

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit b471605:

✅ Validation status: passed

File Status Preview URL Details
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md ✅Succeeded View (powershell-7.5)
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

@jborean93
Copy link
Contributor Author

Thanks, I've been told the master branch is for 7.7 so I'll update the PR's paths. Looks like the references/7.7 folder needs to be created first though.

jborean93 and others added 3 commits December 3, 2025 19:03
Documents the new variable $PSApplicationOutputEncoding which is used to
control the encoding PowerShell uses when reading output from an
external application.
@sdwheeler sdwheeler force-pushed the PSApplicationOutputEncoding branch from b471605 to 93d6630 Compare December 4, 2025 01:07
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 93d6630:

✅ Validation status: passed

File Status Preview URL Details
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md ✅Succeeded View (powershell-7.5)
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

Copy link

@sparrowt sparrowt left a comment

Choose a reason for hiding this comment

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

Trivial but...

Thanks @sparrowt

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 5, 2025 17:31
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR documents the new $PSApplicationOutputEncoding variable for PowerShell 7.5, which controls the character encoding PowerShell uses when reading output from external applications. The PR also updates related documentation and fixes link references.

Key changes:

  • Added comprehensive documentation for the new $PSApplicationOutputEncoding preference variable
  • Updated about_Character_Encoding.md to reference the new variable alongside $OutputEncoding
  • Reorganized link references to accommodate the new variable section

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md Added new $PSApplicationOutputEncoding section with examples, updated table of preference variables, and adjusted all link references to accommodate the new entry
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md Updated to mention three default encoding variables instead of two, added reference to $PSApplicationOutputEncoding, and reorganized link references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

To automatically import a module, get or use a command contained in the module.

The `$PSModuleAutoLoadingPreference` variable takes one of the
The `$PSModuleAutoloadingPreference` variable takes one of the
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Inconsistent capitalization: "Autoloading" should be "AutoLoading" to match the variable name $PSModuleAutoLoadingPreference used elsewhere in the document.

Suggested change
The `$PSModuleAutoloadingPreference` variable takes one of the
The `$PSModuleAutoLoadingPreference` variable takes one of the

Copilot uses AI. Check for mistakes.
The automatic variable `$OutputEncoding` affects the encoding PowerShell uses
to communicate with external programs. It has no effect on the encoding that
the output redirection operators and PowerShell cmdlets use to save to files.
to when sending data to external programs. The `$PSApplicationOutputEncoding`
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Grammar issue: The phrase "to when sending" should be "when sending". Remove the redundant "to" before "when".

Suggested change
to when sending data to external programs. The `$PSApplicationOutputEncoding`
when sending data to external programs. The `$PSApplicationOutputEncoding`

Copilot uses AI. Check for mistakes.
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 1f6203a:

✅ Validation status: passed

File Status Preview URL Details
reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md ✅Succeeded View (powershell-7.5)
reference/7.5/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.5)

For more details, please refer to the build report.

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

Labels

hold-for-release Waiting - for next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants