From: TADA T. <t...@td...> - 2010-09-08 01:04:40
|
ただただしです。 なんかもう、ぜんぜん反応できなくてすまんこってす。 ↓のkdmsnr版パッチが良いと思います(大多数のUTF-8対応クライアント を優先している、GETだけでなくPOSTの場合も正しく動くの2点で)。 コミットしてもらえますか? 2010/9/6 KADO Masanori <kd...@gm...>: > とりあえず↓で動くようになりました。 > どうですかねー。 > > diff --git a/index.rb b/index.rb > index ef17b41..8f71286 100755 > --- a/index.rb > +++ b/index.rb > @@ -22,7 +22,19 @@ begin > $:.unshift( org_path ) unless $:.include?( org_path ) > require 'tdiary' > > - @cgi = CGI::new > + encoding_error = {} > + cgi = CGI::new(:accept_charset => "UTF-8") do |name, value| > + encoding_error[name] = value > + end > + if encoding_error.empty? > + @cgi = cgi > + else > + @cgi = CGI::new(:accept_charset => 'shift_jis') > + @cgi.params = cgi.params > + end > + > conf = TDiary::Config::new(@cgi) > tdiary = nil > status = nil -- ただただし - ツッコミは、短く鋭く愛を込めて♪ http://tdtds.jp/ @tdtds |