Merge pull request #3455 from jekyll/read-csv-data-with-proper-encoding

This commit is contained in:
Parker Moore 2015-02-13 20:52:34 -08:00
commit 30b42c4700
1 changed files with 6 additions and 3 deletions

View File

@ -269,7 +269,10 @@ module Jekyll
def read_data_file(path) def read_data_file(path)
case File.extname(path).downcase case File.extname(path).downcase
when '.csv' when '.csv'
CSV.read(path, :headers => true).map(&:to_hash) CSV.read(path, {
:headers => true,
:encoding => config['encoding']
}).map(&:to_hash)
else else
SafeYAML.load_file(path) SafeYAML.load_file(path)
end end