Permalink
Browse files

Merge remote branch 'tomash/master'

  • Loading branch information...
2 parents 38ed81e + 9396c9d commit e2d26ff8edd688efecc0bf76c1c7991b2e19fc44 @mojombo mojombo committed Nov 18, 2010
View
@@ -6,6 +6,7 @@
* Add --base-url cli option (#235)
* Bug Fixes
* Fixed filename basename generation (#208)
+ * Set mode to UTF8 on Sequel connections (#237)
== 0.7.0 / 2010-08-24
* Minor Enhancements
@@ -40,7 +40,7 @@ def self.postgres(c)
QUERY = "SELECT id, permalink, body, published_at, title FROM contents WHERE user_id = 1 AND type = 'Article' AND published_at IS NOT NULL ORDER BY published_at"
def self.process(dbname, user, pass, host = 'localhost')
- db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host)
+ db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
@@ -20,7 +20,7 @@ module MT
QUERY = "SELECT entry_id, entry_basename, entry_text, entry_text_more, entry_created_on, entry_title FROM mt_entry"
def self.process(dbname, user, pass, host = 'localhost')
- db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host)
+ db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
@@ -17,7 +17,7 @@ module TextPattern
QUERY = "select Title, url_title, Posted, Body, Keywords from textpattern where Status = '4' or Status = '5'"
def self.process(dbname, user, pass, host = 'localhost')
- db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host)
+ db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
@@ -22,7 +22,7 @@ module Typo
def self.process dbname, user, pass, host='localhost'
FileUtils.mkdir_p '_posts'
- db = Sequel.mysql dbname, :user => user, :password => pass, :host => host
+ db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
db[SQL].each do |post|
next unless post[:state] =~ /Published/
@@ -19,7 +19,7 @@ module WordPress
QUERY = "select post_title, post_name, post_date, post_content, post_excerpt, ID, guid from wp_posts where post_status = 'publish' and post_type = 'post'"
def self.process(dbname, user, pass, host = 'localhost')
- db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host)
+ db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"

0 comments on commit e2d26ff

Please sign in to comment.