scrap = Scrap.find_by_site_code(site.code)
ent = "/Volumes/uploader/src/#{site.code}/index.html"
-open(ent) do |f|
+open(ent, 'r:cp932') do |f|
while line = f.gets
if scrap.match(line)
name, summary, size, date, origname, locked = scrap.row
+# encoding: utf-8
+
require 'net/http'
require 'erb'
require 'nkf'
attr_accessor :host, :root_path, :jcode, :dlkey, :authorization, :local_dir, :base_html
def initialize
- @jcode = ERB::Util.u("\8a¿\8e\9a")
+ @jcode = ERB::Util.u(NKF.nkf('-Ws', "漢字"))
@dlkey = "custom"
@authorization = nil
@local_dir = "."
def kcode=(kcode)
case kcode
when /^U/i
- @jcode = ERB::Util.u(NKF.nkf('-Sw', "\8a¿\8e\9a"))
+ @jcode = ERB::Util.u("漢字")
end
end