How do I determine file encoding in OS X? October 16, 2022 by Tarik Using the -I (that’s a capital i) option on the file command seems to show the file encoding. file -I {filename}