#!/usr/bin/env ruby # coding: utf-8 require "cgi" require "pstore" require 'kconv' # utf-8への変換のため(toutf8メソッド) myname = "cc2.rb" c = CGI.new(:accept_charset => "UTF-8") item = c["item"] cmt = c["comment"] time = Time.now # 時刻を保持するTimeクラス代入。nowは現時刻 edit_item = ARGV[0].to_s.toutf8 # 修正モードの場合の修正項目名 oldcomment = "" # 修正モードの場合の既存コメント print 'Content-type: text/html; charset=UTF-8