-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Tee-Object should have an -Encoding parameter #11104
Copy link
Copy link
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Summary of the new feature/enhancement
Tee-Objectcurrently invariably uses the default character encoding when teeing to a file (-Pathaka-Filepath,-LiteralPath), which in PS Core is BOM-less UTF-8However, sometimes you need a specific character encoding, and
Tee-Objectcurrently offers no way to specify a different encoding.Proposed technical implementation details (optional)
Introduce an
-Encodingparameter (to be combined only with the-Path/-FilePathor-LiteralPath, analogous to the parameter of the same name already supported by other write-to-file cmdlets such asOut-File.