Skip to content

Commit

Permalink
Merge pull request #22 from chrisivens/fix-drupal6-titles
Browse files Browse the repository at this point in the history
Add forced utf8 encoding of titles
  • Loading branch information
parkr committed Jun 30, 2013
2 parents 28c0ce1 + a14665d commit 2e1354f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/jekyll/jekyll-import/drupal6.rb
Expand Up @@ -66,7 +66,9 @@ def self.process(dbname, user, pass, host = 'localhost', prefix = '')
'layout' => 'post',
'title' => title.to_s,
'created' => created,
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
}.delete_if { |k,v| v.nil? || v == ''}.each_pair {
|k,v| ((v.is_a? String) ? v.force_encoding("UTF-8") : v)
}.to_yaml

# Write out the data and content to file
File.open("#{dir}/#{name}", "w") do |f|
Expand Down

0 comments on commit 2e1354f

Please sign in to comment.