diff --git a/lib/common/hacks.rb b/lib/common/hacks.rb index d374517e..7c091db6 100644 --- a/lib/common/hacks.rb +++ b/lib/common/hacks.rb @@ -76,7 +76,7 @@ class File # # @return [ String ] The charset of the file def self.charset(file_path) - %x{file -i #{file_path}}[%r{charset=([^\n]+)\n}, 1] + %x{file --mime #{file_path}}[%r{charset=([^\n]+)\n}, 1] end end