When I have a file created in Vim/Linux with :set fileencoding=utf-8
and have diacritics (as e.g. german umlauts) in the file, then calling up file myfile.txt
results to myfile.txt: UTF-8 Unicode text
. If I have no diacritics in the file, then the determination of the file encoding results to myfile.txt: ASCII text
.
Why is that? And how can I determine safely, that a whole bunch of files is encoded correctly by using UTF-8 file encoding?
EDIT:
ASCII is 7-bit and is a subset of UTF-8. I want to know if my source files are encoded in UTF-8 so that they can hold diacritics sometime in the future. IMO this is not obvious and I like to find a way to determine this safely.