Encoding.GetEncodings returns an array that contains all encodings.
Imports System
Imports System.Text
Public Class SamplesEncoding
Public Shared Sub Main()
Dim ei As EncodingInfo
For Each ei In Encoding.GetEncodings()
Dim e As Encoding = ei.GetEncoding()
Console.Write("{0,-6} {1,-25} ", ei.CodePage, ei.Name)
Console.Write("{0,-8} {1,-8} ", e.IsBrowserDisplay, e.IsBrowserSave)
Console.Write("{0,-8} {1,-8} ", e.IsMailNewsDisplay, e.IsMailNewsSave)
Console.WriteLine("{0,-8} {1,-8} ", e.IsSingleByte, e.IsReadOnly)
Next ei
End Sub
End Class
Related examples in the same category