Class EncodingsRegistry
Inheritance
Namespace: IronSoftware.Pdfium.Dom.Encoding
Assembly: IronPdf.dll
Syntax
public sealed class EncodingsRegistry : Object
Properties
Instance
Declaration
public static EncodingsRegistry Instance { get; }
Property Value
| Type | Description |
|---|---|
| EncodingsRegistry |
Exceptions
| Type | Condition |
|---|---|
| System.MemberAccessException | The System.Lazy`1 instance is initialized to use the default constructor of the type that is being lazily initialized, and permissions to access the constructor are missing. |
| System.MissingMemberException | The System.Lazy`1 instance is initialized to use the default constructor of the type that is being lazily initialized, and that type does not have a public, parameterless constructor. |
| System.InvalidOperationException | The initialization function tries to access System.Lazy`1.Value on this instance. |
Methods
GetEncoding(Int32)
Returns the encoding associated with the specified code page identifier.
Declaration
public static Encoding GetEncoding(int codepage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | codepage | The code page identifier of the preferred encoding. Possible values are listed in the Code Page column of the table that appears in the System.Text.Encoding class topic.-or- 0 (zero), to use the default encoding. |
Returns
| Type | Description |
|---|---|
| System.Text.Encoding |
GetEncoding(String)
Returns the encoding associated with the specified code page name.
Declaration
public static Encoding GetEncoding(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The code page name of the preferred encoding. Any value returned by the System.Text.Encoding.WebName property is valid. Possible values are listed in the Name column of the table that appears in the System.Text.Encoding class topic. |
Returns
| Type | Description |
|---|---|
| System.Text.Encoding |