File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ namespace MagicFileEncoding
99 public class MagicFileEncoding
1010 {
1111 /// <summary>
12- /// The fallback encoding (ISO-8859-1 by default)
12+ /// The fallback encoding<br />
13+ /// <i>ISO-8859-1 (Latin-1)by default</i>
1314 /// </summary>
1415 public Encoding FallbackEncoding { get ; set ; } = Encoding . GetEncoding ( "iso-8859-1" ) ;
1516
Original file line number Diff line number Diff line change 11# Magic File Encoding
22
33### Fallback Encoding
4- The fallback encoding is ISO-8859-1 by default.
4+ The fallback encoding is ISO-8859-1 (Latin-1) by default.
5+
6+ (Because this lib was designed for the german culture space)
57
68# Credits
7- This work is heavily based on the flowing stack overflow articles:<br >
8- [ effective-way-to-find-any-files-encoding] ( https://stackoverflow.com/questions/3825390/effective-way-to-find-any-files-encoding ) <br >
9- [ determine-a-strings-encoding-in-c-sharp] ( https://stackoverflow.com/questions/1025332/determine-a-strings-encoding-in-c-sharp ) <br >
10- [ check-for-invalid-utf8] ( https://stackoverflow.com/questions/6555015/check-for-invalid-utf8 ) <br >
11- [ how-to-detect-utf-8-in-plain-c] ( https://stackoverflow.com/questions/1031645/how-to-detect-utf-8-in-plain-c ) <br >
9+ This work is heavily based on the flowing stack overflow articles:<br / >
10+ [ effective-way-to-find-any-files-encoding] ( https://stackoverflow.com/questions/3825390/effective-way-to-find-any-files-encoding ) <br / >
11+ [ determine-a-strings-encoding-in-c-sharp] ( https://stackoverflow.com/questions/1025332/determine-a-strings-encoding-in-c-sharp ) <br / >
12+ [ check-for-invalid-utf8] ( https://stackoverflow.com/questions/6555015/check-for-invalid-utf8 ) <br / >
13+ [ how-to-detect-utf-8-in-plain-c] ( https://stackoverflow.com/questions/1031645/how-to-detect-utf-8-in-plain-c ) <br / >
1214[ strip-byte-order-mark-from-string-in-c-sharp] ( https://stackoverflow.com/questions/1317700/strip-byte-order-mark-from-string-in-c-sharp )
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ namespace UnitTests
55{
66 public class Tests
77 {
8- private MagicFileEncoding . MagicFileEncoding mfe ;
8+ private MagicFileEncoding . MagicFileEncoding _mfe ;
99
1010 [ SetUp ]
1111 public void Setup ( )
1212 {
13- mfe = new MagicFileEncoding . MagicFileEncoding ( ) ;
13+ _mfe = new MagicFileEncoding . MagicFileEncoding ( ) ;
1414 }
1515
1616 [ TestCase ( "\\ TestFiles\\ A_ANSI.txt" ) ]
@@ -23,7 +23,7 @@ public void Setup()
2323 public void AutomaticReadAllText ( string subFilePath )
2424 {
2525 var filePath = TestContext . CurrentContext . WorkDirectory + subFilePath ;
26- Assert . AreEqual ( "Kleiner Test äöüÄÖÜ?ß" , mfe . AutomaticReadAllText ( filePath , Encoding . Unicode ) ) ;
26+ Assert . AreEqual ( "Kleiner Test äöüÄÖÜ?ß" , _mfe . AutomaticReadAllText ( filePath , Encoding . Unicode ) ) ;
2727 }
2828 }
2929}
You can’t perform that action at this time.
0 commit comments