diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-06 02:01:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-06 02:01:51 +0000 |
commit | 48f9118253859969d0f300dcb13b84a99c2f5bd4 (patch) | |
tree | f9662d8cd4d87b7fda9d77625a6075f5bb06d49c /lib/uri/common.rb | |
parent | 364a0879c984aff94f2d0981e2d2aace61cbe715 (diff) |
Update URI WEB_ENCODINGS_ hash, and fix documented cmd to
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r-- | lib/uri/common.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 4c7d112e61..a6ca3365a7 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -487,7 +487,7 @@ module URI end private - # curl http://encoding.spec.whatwg.org/encodings.json|rb -rpp -rjson -e'H={};h={"shift_jis"=>"Windows-31J","euc-jp"=>"cp51932","iso-2022-jp"=>"cp50221","x-mac-cyrillic"=>"macCyrillic"};JSON($<.read).map{|x|x["encodings"]}.flatten.each{|x|Encoding.find(n=h.fetch(n=x["name"],n))rescue next;x["labels"].each{|y|H[y]=n}};pp H' + # curl https://encoding.spec.whatwg.org/encodings.json|ruby -rpp -rjson -e'H={};h={"shift_jis"=>"Windows-31J","euc-jp"=>"cp51932","iso-2022-jp"=>"cp50221","x-mac-cyrillic"=>"macCyrillic"};JSON($<.read).map{|x|x["encodings"]}.flatten.each{|x|Encoding.find(n=h.fetch(n=x["name"].downcase,n))rescue next;x["labels"].each{|y|H[y]=n}};pp H' WEB_ENCODINGS_ = { "unicode-1-1-utf-8"=>"utf-8", "utf-8"=>"utf-8", @@ -593,6 +593,7 @@ module URI "koi8"=>"koi8-r", "koi8-r"=>"koi8-r", "koi8_r"=>"koi8-r", + "koi8-ru"=>"koi8-u", "koi8-u"=>"koi8-u", "dos-874"=>"windows-874", "iso-8859-11"=>"windows-874", @@ -673,6 +674,7 @@ module URI "csiso2022jp"=>"cp50221", "iso-2022-jp"=>"cp50221", "csshiftjis"=>"Windows-31J", + "ms932"=>"Windows-31J", "ms_kanji"=>"Windows-31J", "shift-jis"=>"Windows-31J", "shift_jis"=>"Windows-31J", |