From da4ee57e5816c05bf42a02c08c70e8e6fcf99d6b Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Mon, 15 Apr 2013 13:54:27 +0200 Subject: [PATCH] Changed 'file' flag in charset method, see Issue #167. --- lib/common/hacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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