Пример #1
0
        /// <summary>
        /// Returns an array that contains all encodings.
        /// </summary>
        /// <returns>An array that contains all encodings.</returns>
        public static EncodingInfo[] GetEncodings()
        {
            if (System.Text.Encoding._encodings != null)
            {
                return(System.Text.Encoding._encodings);
            }
            System.Text.Encoding._encodings = new EncodingInfo[6];
            var result = System.Text.Encoding._encodings;

            result[0] = new System.Text.EncodingInfo(20127, "us-ascii", "US-ASCII");
            result[1] = new System.Text.EncodingInfo(1200, "utf-16", "Unicode");
            result[2] = new System.Text.EncodingInfo(1201, "utf-16BE", "Unicode (Big-Endian)");
            result[3] = new System.Text.EncodingInfo(65000, "utf-7", "Unicode (UTF-7)");
            result[4] = new System.Text.EncodingInfo(65001, "utf-8", "Unicode (UTF-8)");
            result[5] = new System.Text.EncodingInfo(1200, "utf-32", "Unicode (UTF-32)");
            return(result);
        }
Пример #2
0
 internal static EncInfo convert(System.Text.EncodingInfo info)
 {
     return(new EncInfo(info));
 }
Пример #3
0
 public EncInfo(System.Text.EncodingInfo info)
 {
     this.info = info;
 }