Maybe you already tried this, but can you use File.stream!/3?
Unfortunately, there’s no straightforward way to detect the character encoding of a file. This project called UniversalDetector does some heuristics and statistical analysis to guess the character encoding.
It may be that your file just has junk characters. You could run it through some regex to strip any non-printable characters.






















