示例#1
0
        Line ReadLine(EncodingDetectionTestReader reader, long position)
        {
            long sPos = reader.Stream.Position;
            Line l    = reader.GetLine(position);

            reader.Stream.Seek(sPos, SeekOrigin.Begin);
            return(l);
        }
示例#2
0
        public void TestMethod2()
        {
            EncodingDetectionTestReader tr = new EncodingDetectionTestReader();
            StreamWriter sw = new StreamWriter(tr.Stream, new UTF8Encoding(false));

            sw.Write("Ä");
            sw.Flush();
            tr.GetLine(0);
            Assert.AreEqual(Encoding.UTF8.CodePage, tr.Encoding.CodePage);
        }