diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 3af47672..100f50f1 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -262,19 +262,22 @@ module Jekyll end end end - + # Determines how to read a data file. # # Returns the contents of the data file. def read_data_file(path) case File.extname(path).downcase when '.csv' - CSV.read(path, :headers => true).map(&:to_hash) + CSV.read(path, { + :headers => true, + :encoding => config['encoding'] + }).map(&:to_hash) else SafeYAML.load_file(path) end end - + # Read in all collections specified in the configuration # # Returns nothing.