![How can i find what my text encoding is](https://kumkoniak.com/55.jpg)
![how can i find what my text encoding is how can i find what my text encoding is](https://www.thewindowsclub.com/wp-content/uploads/2019/02/UTF-code.png)
![how can i find what my text encoding is how can i find what my text encoding is](https://miro.medium.com/max/1400/1*MMVq6Cdk06fj5BeJqFSASg.jpeg)
![how can i find what my text encoding is how can i find what my text encoding is](https://chronoplexsoftware.com/gedcomvalidator/help/images/screens/EncodingRepair.png)
For example, Encoding.UTF8 is configured in such a way that when you write out to a StreamWriter it will always write out the Byte Order Mark unless you explicitly create a new instance with the constructor that disables it (ie. For my converter this translated into problems when the source JavaScript files were not encoded with UTF-8, but it worked fine with any of the UTF-xx encodings which is why I missed this. It doesn't revert back to Encoding.Default if it can't find a byte order mark - the default without a byte order mark is UTF-8 which usually will result in invalid text parsing. It actually works but only if the content is encoded as UTF-8/16/32 - ie. StreamReader() specifically has an overload that's supposed to help with detection of byte order marks and based on that is supposed to sniff the document's encoding. It turns out part of the problem is the code I snatched from Douglas Crockford's original C# minifier code, but there's also an issue with some of the code I added to provide string translations. I posted a JavaScript Minifier application yesterday and somebody correctly pointed out that the text encoding was incorrect. StreamReader supports byte order mark detection and in most cases that seems to be working Ok, but if you deal with a variety of different file encodings for input files using the default detection comes up short. I keep running into issues in regards to auto-detection of file types when using StreamReader.
![How can i find what my text encoding is](https://kumkoniak.com/55.jpg)