< Back
Get-DTWFileEncodingSystemProviderNameFromTypeName
Post
NAME Get-DTWFileEncodingSystemProviderNameFromTypeName
SYNOPSIS
Returns file system cmdlet provider encoding name given common encoding name.
SYNTAX
Get-DTWFileEncodingSystemProviderNameFromTypeName [-Name] <String> [<CommonParameters>]
DESCRIPTION
When passed a encoding name, such as the encoding type name or BodyName or WebName,
etc. returns the valid Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding.
In other words, when you need to call Get-Content and pass in a valid Encoding value
but the values you have don't exactly match, use this function to get the right value.
Warning - if you pass in the type itself / type name of a Big Endian UTF 16 or 32
type, the function will return the Little Endian equivalent. You need to specify a
value that's more specific, say the BodyName, EncodingName, HeaderName or WebName
values off the type itself.
If no match found throws error - all valid names are in parameter set.
Also, sorry for the long function name.
PARAMETERS
-Name <String>
A name value of encoding type, such as Ascii, US-ASCII, UTF8, utf-8, etc.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-DTWFileEncodingSystemProviderNameFromTypeName 'utf-8'
UTF8
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DTWFileEncodingSystemProviderNameFromTypeName 'Unicode (UTF-8)'
UTF8
RELATED LINKS
SYNOPSIS
Returns file system cmdlet provider encoding name given common encoding name.
SYNTAX
Get-DTWFileEncodingSystemProviderNameFromTypeName [-Name] <String> [<CommonParameters>]
DESCRIPTION
When passed a encoding name, such as the encoding type name or BodyName or WebName,
etc. returns the valid Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding.
In other words, when you need to call Get-Content and pass in a valid Encoding value
but the values you have don't exactly match, use this function to get the right value.
Warning - if you pass in the type itself / type name of a Big Endian UTF 16 or 32
type, the function will return the Little Endian equivalent. You need to specify a
value that's more specific, say the BodyName, EncodingName, HeaderName or WebName
values off the type itself.
If no match found throws error - all valid names are in parameter set.
Also, sorry for the long function name.
PARAMETERS
-Name <String>
A name value of encoding type, such as Ascii, US-ASCII, UTF8, utf-8, etc.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-DTWFileEncodingSystemProviderNameFromTypeName 'utf-8'
UTF8
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DTWFileEncodingSystemProviderNameFromTypeName 'Unicode (UTF-8)'
UTF8
RELATED LINKS