Skip to content

Common encoding pattern for Utility Cmdlets #3628

@iSazonov

Description

@iSazonov

Current encodings in Utility Cmdlets:

Cmdlet Encodings
CVSCommands.cs (1 and 2) "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM"
Format-Hex.cs "Unicode", "BigEndianUnicode", "Utf8", "Utf7", "Utf32", "Ascii"
Out-File.cs "Unknown", "String", "Unicode", "BigEndianUnicode", "Utf8", "Utf7", "Utf32", "Ascii", "Default", "OEM"
ImplicitRemotingCommands.cs "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM"
MatchString.cs "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM"
XmlCommands.cs "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM"

It seems we can safely migrate to a common pattern "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM".

Format-Hex was converted from function to cmdlet. I believe we can enhance it.

Out-File. My understanding is that "Unknown" and "String" encodings is output encodings and don't be used as input encodings. So we can and should remove them from Out-File cmdlet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions