Example #1
0
        public static string GetFileEncoding(FilePath fileName)
        {
            // Maybe this can be optimized later.
            TextFile file = TextFile.ReadFile(fileName);

            return(file.SourceEncoding);
        }
Example #2
0
        public TextFileReader(string fileName)
        {
            TextFile file = TextFile.ReadFile(fileName);

            reader         = new StringReader(file.Text);
            sourceEncoding = file.SourceEncoding;
        }