Skip to content

Conversation

@jborean93
Copy link
Contributor

PR Summary

Updates the documentation for the $OutputEncoding preference variable. This also updates the examples to correctly reflect what this option actually does.

The current description used is incorrect, $OutputEncoding only applies to data being piped into external applications. The command line is always text on all platforms that PowerShell runs on so the encoding never applies and PowerShell uses [Console]::OutputEncoding to control how it decodes the output from an external application.

The examples used for the 5.1 docs are slightly different to reflect the different defaults and code changes/output for the 5.1 version. The same fundamental behaviour still applies to both though.

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.

Updates the documentation for the $OutputEncoding preference variable.
This also updates the examples to correctly reflect what this option
actually does.
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 634cdc7:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.2)
reference/7.3/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.3)
reference/7.4/Microsoft.PowerShell.Core/About/about_Preference_Variables.md ✅Succeeded View (powershell-7.4)
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.

For any questions, please:

@github-actions
Copy link

Expectations

Thanks for your submission! Here's a quick note to provide you with some context for what to expect from the docs team and the process now that you've submitted a PR. Even if you've contributed to this repo before, we strongly suggest reading this information; it might have changed since you last read it.

To see our process for reviewing PRs, please read our editor's checklist and process for managing pull requests in particular. Below is a brief, high-level summary of what to expect, but our contributor guide has expanded details.

The docs team begins to review your PR if you request them to or if your PR meets these conditions:

  • It is not a draft PR.
  • It does not have a WIP prefix in the title.
  • It passes validation and build steps.
  • It does not have any merge conflicts.
  • You have checked every box in the PR Checklist, indicating you have completed all required steps and marked your PR as Ready to Merge.

You can always request a review at any stage in your authoring process, the docs team is here to help! You do not need to submit a fully polished and finished draft; the docs team can help you get content ready for merge.

While reviewing your PR, the docs team may make suggestions, write comments, and ask questions. When all requirements are satisfied, the docs team marks your PR as Approved and merges it. Once your PR is merged, it is included the next time the documentation is published. For this project, the documentation is published daily at 3 p.m. Pacific Standard Time (PST).

@michaeltlombardi
Copy link
Contributor

@jborean93 - Thanks for this PR!

Looking through the updated example, it seems to be shifting from intending to show a practical use towards demonstrating behavior. I'm wondering if there's an alternate example we can replace the (incorrect) existing one with.

@jborean93
Copy link
Contributor Author

Looking through the updated example, it seems to be shifting from intending to show a practical use towards demonstrating behavior. I'm wondering if there's an alternate example we can replace the (incorrect) existing one with.

That’s the problem I don’t know of any practical examples. I’ve never had to use this variable and while I can see it might be needed I don’t know off any ones that actually exist right now. I even asked in the pwsh Discord and didn’t get any reply, in fact people thought this controlled something else.

In light off that I thought at least showing an actual example where the differences where plain to see was at least better than an example that had no relevance to the option.

@michaeltlombardi michaeltlombardi merged commit 4303089 into MicrosoftDocs:main Feb 14, 2024
@jborean93 jborean93 deleted the OutputEncoding branch February 14, 2024 19:56
@jborean93
Copy link
Contributor Author

Thanks, if I ever come across a practical example I'll try and remember to submit another PR :)

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.

2 participants