Пример #1
0
        /// <summary>
        /// convert the ebcdic encoded input bytes to a unicode string.
        /// </summary>
        /// <param name="Bytes"></param>
        /// <returns></returns>
        public static string FromEbcdic(this byte[] Bytes)
        {
            global::System.Text.Encoding encoding =
                global::System.Text.Encoding.GetEncoding(37); // 37 = ebcdic
            var chars = encoding.GetChars(Bytes);

            return(new string(chars));
        }
Пример #2
0
        public static string EbcdicBytesToString(this byte[] Bytes)
        {
            global::System.Text.Encoding encoding =
                global::System.Text.Encoding.GetEncoding(37);
            var chars = encoding.GetChars(Bytes);

            return(new string(chars));
        }