public static Encoding GetEncoding(
string? encodingWebName,
bool throwOnInvalidWebName = false
)Public Shared Function GetEncoding (
encodingWebName As String,
Optional throwOnInvalidWebName As Boolean = false
) As Encodingpublic:
static Encoding^ GetEncoding(
String^ encodingWebName,
bool throwOnInvalidWebName = false
)static member GetEncoding :
encodingWebName : string *
?throwOnInvalidWebName : bool
(* Defaults:
let _throwOnInvalidWebName = defaultArg throwOnInvalidWebName false
*)
-> Encoding .NET Standard and .NET 5.0 or later only recognize a small number of character sets by default. The method overrides this default.
The properties EncoderFallback and DecoderFallback of the generated Encoding object are set to ReplacementFallback.
| ArgumentException | encodingWebName could not be mapped to a Encoding object. An exception is only thrown if the optional parameter throwOnInvalidWebName is true. |