Bytes first, text second
Every file is bytes. The encoding is a choice about how to read them, and the same bytes can be read many ways.
utf-8 is the safe default
Name utf-8 on every open. The platform default differs between machines, which is how files break when they travel.