Index: /trunk/install/perl/getxml2db.pl =================================================================== --- /trunk/install/perl/getxml2db.pl (リビジョン 94) +++ /trunk/install/perl/getxml2db.pl (リビジョン 109) @@ -40,12 +40,15 @@ } -if ($ARGV[0] eq "long"){ - $uri="http://cal.syoboi.jp/cal_chk.php"; - #$uri="http://syobocal.orz.hm/cal_chk.php"; - &writelog("getxml2db use long mode."); -}else{ - $uri="http://cal.syoboi.jp/cal_chk.xml"; - #$uri="http://syobocal.orz.hm/cal_chk.xml"; -} +# http://sites.google.com/site/syobocal/spec/cal_chk-php +#if ($ARGV[0] eq "long"){ +# $uri="http://cal.syoboi.jp/cal_chk.php"; +# #$uri="http://syobocal.orz.hm/cal_chk.php"; +# &writelog("getxml2db use long mode."); +#}else{ +# $uri="http://cal.syoboi.jp/cal_chk.xml"; +# #$uri="http://syobocal.orz.hm/cal_chk.xml"; +#} +$uri = "http://cal.syoboi.jp/cal_chk.php?days="; +$uri .= ($ARGV[0] eq "long")? 14: 7; $dbh = DBI->connect($DSN,$DBUser,$DBPass) ||die $DBI::error;; @@ -71,6 +74,9 @@ foreach(@line){ - -Jcode::convert(\$_,'euc'); +s/\xef\xbd\x9e/\xe3\x80\x9c/g; #wavedash +s/\xef\xbc\x8d/\xe2\x88\x92/g; #hyphenminus +s/&#([0-9A-Fa-f]{2,6});/(chr($1))/eg; #'遊戯王5D's'とかの数値参照対応を + +Jcode::convert(\$_,'euc','utf8'); # @@ -96,5 +102,5 @@ #$item{ProgComment}=''; eval("$_"); -Jcode::convert(\$item{Title},'euc'); +#Jcode::convert(\$item{Title},'euc'); $programtitlename = $item{Title}; @@ -105,6 +111,6 @@ $programtitle = $programtitlename; -Jcode::convert(\$item{ChName},'euc'); -Jcode::convert(\$item{SubTitle},'euc'); +#Jcode::convert(\$item{ChName},'euc'); +#Jcode::convert(\$item{SubTitle},'euc'); #$programSubTitle = $dbh->quote($item{SubTitle});