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

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s