* lib/cgi.rb (CGI#out): remove auto encoding conversion and set
LANGUAGE. [ruby-dev:35922] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8aaf39ce80
commit
9c24ab3d9d
@ -1,3 +1,8 @@
|
|||||||
|
Sat Aug 23 23:25:47 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/cgi.rb (CGI#out): remove auto encoding conversion and set
|
||||||
|
LANGUAGE. [ruby-dev:35922]
|
||||||
|
|
||||||
Sat Aug 23 20:01:29 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
Sat Aug 23 20:01:29 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* test/ruby/test_process.rb (TestProcess#test_rlimit_value):
|
* test/ruby/test_process.rb (TestProcess#test_rlimit_value):
|
||||||
|
16
lib/cgi.rb
16
lib/cgi.rb
@ -714,22 +714,6 @@ class CGI
|
|||||||
|
|
||||||
options = { "type" => options } if options.kind_of?(String)
|
options = { "type" => options } if options.kind_of?(String)
|
||||||
content = yield
|
content = yield
|
||||||
|
|
||||||
if options.has_key?("charset")
|
|
||||||
require "nkf"
|
|
||||||
case options["charset"]
|
|
||||||
when /iso-2022-jp/ni
|
|
||||||
content = NKF::nkf('-j -m0 -x', content)
|
|
||||||
options["language"] = "ja" unless options.has_key?("language")
|
|
||||||
when /euc-jp/ni
|
|
||||||
content = NKF::nkf('-e -m0 -x', content)
|
|
||||||
options["language"] = "ja" unless options.has_key?("language")
|
|
||||||
when /shift_jis/ni
|
|
||||||
content = NKF::nkf('-s -m0 -x', content)
|
|
||||||
options["language"] = "ja" unless options.has_key?("language")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
options["length"] = content.bytesize.to_s
|
options["length"] = content.bytesize.to_s
|
||||||
output = stdoutput
|
output = stdoutput
|
||||||
output.binmode if defined? output.binmode
|
output.binmode if defined? output.binmode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user