Changed 'file' flag in charset method, see Issue #167.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user