Skip to content

Encoding parameter accept numeric Ids and name of registered code pages #2937

@iSazonov

Description

@iSazonov

Issue Details

PR PowerShell/PowerShell#7636 enhance the encoding transformation attribute:

  • to allow numeric Ids of registered code pages (like -Encoding 1251)
  • to allow string names of registered code pages (like -Encoding "windows-1251")

Affected cmdlets:

gcm -ParameterName Encoding

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Add-Content                                        6.1.0.0    Microsoft.PowerShell.Management
Cmdlet          Export-Clixml                                      6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Export-Csv                                         6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Export-PSSession                                   6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Format-Hex                                         6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Get-Content                                        6.1.0.0    Microsoft.PowerShell.Management
Cmdlet          Import-Csv                                         6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Out-File                                           6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Select-String                                      6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Send-MailMessage                                   6.1.0.0    Microsoft.PowerShell.Utility
Cmdlet          Set-Content                                        6.1.0.0    Microsoft.PowerShell.Management

Full list supported code pages we can found in
https://github.com/dotnet/corefx/blob/master/src/System.Text.Encoding.CodePages/src/System/Text/EncodingTable.Data.cs

Version(s) of document impacted

  • Impacts 6.next document
  • Impacts 6 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Reason(s) for not selecting all version of documents

  • The documented feature was introduced in selected version of PowerShell
  • This issue only shows up in selected version of the document

Metadata

Metadata

Assignees

Labels

Pri2Priority - Mediumarea-coreArea - Microsoft.PowerShell.Core module

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions