--- convert.rb	2013-11-10 03:59:44.243430122 +0900
+++ /home/murashin/convert.rb	2013-11-09 04:28:51.435655398 +0900
@@ -9,9 +9,31 @@
 require "nkf"
 require "hiki/util"
 require "hiki/config"
+require 'hiki/db/ptstore'
 
 FILE_NAME_MAX_SIZE = 255
 
+def convert_info_db(data_path, input_encoding, output_encoding, nkf)
+
+  info_db_path = data_path + "/info.db"
+  db = PTStore.new(info_db_path)
+
+  db.transaction do
+    db.roots.each do |d|
+      db[d][:title] = encode(db[d][:title], input_encoding, output_encoding, nkf)
+      db[d][:references].map! do |r|
+        encode(r, input_encoding, output_encoding, nkf)
+      end
+    end
+    db.roots.each do |d|
+      d_new = encode((d.unescape).escape, input_encoding, output_encoding, nkf)
+      db[d_new] = db[d]
+      db.delete d
+    end
+    db.commit
+  end
+end
+
 def check(data_path, database_class, input_encoding, output_encoding, nkf)
   config = Struct.new(:data_path).new
   config.data_path = data_path.expand_path
@@ -123,6 +145,7 @@
   if check_only
     check(data_path, database_class, input_encoding, output_encoding, nkf)
   else
+    convert_info_db(data_path, input_encoding, output_encoding, nkf)
     convert(data_path, database_class, input_encoding, output_encoding, nkf)
   end
 end
