#!/usr/bin/env ruby # coding: utf-8 require 'cgi' require 'kconv' c = CGI.new(:accept_charset => "binary") print "Content-type: text/html; charset=UTF-8\n\n" name = c["namae"].toutf8 bt = c["blood"].toutf8 print " Blood type \n" print "

#{name}さんの血液型

\n" print "

#{name}さんは#{bt.upcase}型ですね!

\n" print "\n" print "\n"