Mac – Check File Encoding

The following command could show you the character encoding set of a specific file.

file -I <filename>

 

Possible output:

<filename>: text/plain; charset=us-ascii

 

Please note that the paraemeter -I is the capital letter of i but NOT smaller letter of L.

Reference: StackOverflow – How do I determine file encoding in OSX?

Done =)

2 thoughts on “Mac – Check File Encoding”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.