An ANSI text file and a UTF-8 text file without BOM (Byte Order Mark) can sometimes be difficult to distinguish. They are determined to be in one format or the other based on content. That is, the text editor has to essentially make an educated guess whether it should decode the bytes as ANSI or UTF-8. Therefore, in order to determine where things are going wrong, it's important to see what is being misinterpreted. Please post a screenshot of the problem you are seeing. Then I'll have a proper starting point to determine a possible solution.
Please note that a file that opens as "UTF-8" will be identical to a file that opens as "ANSI" if there are no Unicode characters. That is, if all the bytes are ANSI compatible, it does not matter if the editor says it's a UTF-8 file or an ANSI file.