From 52817c3654518c55de31666848f08d7ac58f8787 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 4 Sep 2006 07:40:46 +0000 Subject: * lib/cgi.rb (CGI::out): specify -x option for nkf. * lib/cgi.rb (CGI::out): should not convert utf-8 implicitly using NKF. it is too Japanese centric. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/cgi.rb') diff --git a/lib/cgi.rb b/lib/cgi.rb index 4cd497849a..8d6705c44a 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -718,16 +718,14 @@ class CGI require "nkf" case options["charset"] when /iso-2022-jp/ni - content = NKF::nkf('-j -m0', content) + content = NKF::nkf('-j -m0 -x', content) options["language"] = "ja" unless options.has_key?("language") when /euc-jp/ni - content = NKF::nkf('-e -m0', content) + content = NKF::nkf('-e -m0 -x', content) options["language"] = "ja" unless options.has_key?("language") when /shift_jis/ni - content = NKF::nkf('-s -m0', content) + content = NKF::nkf('-s -m0 -x', content) options["language"] = "ja" unless options.has_key?("language") - when /utf-8/ni - content = NKF::nkf('-w -m0', content) end end -- cgit v1.2.3