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 =)

Advertisement

2 thoughts on “Mac – Check File Encoding”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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