るりまサーチ

最速Rubyリファレンスマニュアル検索!
86件ヒット [1-86件を表示] (0.033秒)
トップページ > クエリ:form[x] > クエリ:decode[x]

別のキーワード

  1. cgi form
  2. cgi/html form
  3. cgi multipart_form
  4. htmlextension form
  5. cgi/html multipart_form

種類

ライブラリ

モジュール

検索結果

URI.decode(str) -> String (18125.0)

URI 文字列をデコードした文字列を返します。

...文字列をデコードした文字列を返します。

このメソッドは obsolete です。

代わりに
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。

例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/image...

URI.decode_www_form_component(str, enc=Encoding::UTF_8) -> String (12272.0)

URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。

...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。

通常は URI.decode_www_form を使うほうがよいでしょう。

"+" という文字は空白文字にデコードします。

enc で指定したエンコーディングの文字...
...グを付加します。

このメソッドは
https://www.w3.org/TR/html5/sec-forms.html#urlencoded-form-data
にもとづいて実装されています。


//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%...
...RI.decode_www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_w...

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (12254.0)

文字列から URL-encoded form data をデコードします。

...文字列から URL-encoded form data をデコードします。

application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。

enc で指定したエンコーディングの文字列が URL エンコードされたもの...
...
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary #=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.assoc('b').last #=> '3'...
...p Hash[ary] #=> {"a"=>"2", "b"=>"3"}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.decode_www_form_component, URI.encode_www_form...

URI.encode_www_form(enum, enc=nil) -> String (6165.0)

enum から URL-encoded form data を生成します。

...ed form data を生成します。

HTML5 で定義されている application/x-www-form-urlencoded 形式の
文字列を生成します。

enum には通常 [key, value] という形の配列の配列を渡します。
以下の例を見てください。

require 'uri'
URI.encode_www_form([...
...lue] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。

require 'uri'
URI.encode_www_form({"a"=>"1", "b"=>"2", "c"=>"x yz"})
# => "a=1&b=2&c=x+yz"

このメソッドは引数のエンコーディングを変換しません。そのた...
...されています。

@param enum エンコードするデータ列([key, value] という形のデータの列)
@param enc 指定された場合、パーセントエンコーディングする前に、このエンコーディングに変換
@see URI.encode_www_form_component, URI.decode_www_form...

URI.encode_www_form_component(str, enc=nil) -> String (6153.0)

文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。

...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。

通常は URI.encode_www_form を使うほうがよいでしょう。

このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他...
...換します。

このメソッドは
https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。

//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%...
...%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}

@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form...

絞り込み条件を変える

URI.unescape(str) -> String (3025.0)

URI 文字列をデコードした文字列を返します。

...文字列をデコードした文字列を返します。

このメソッドは obsolete です。

代わりに
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。

例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/image...

NEWS for Ruby 2.1.0 (24.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...exits from the Proc, not from the
method where the lambda is created. Returning from non-lambda proc exits
from the method, same as the former behavior.

* String
* 以下のコードでレシーバーのエンコーディングと変換後のエンコーディングが同一で...
...(experimental)
* Improved, iterative resolver (compared to RubyGems 2.1 and earlier)
* Support for a sharing a GEM_HOME across ruby platforms and versions
* https://github.com/rubygems/rubygems/tree/master/History.txt

* set
* 追加: Set#intersect?
* 追加: Set#disjoint...
...* 非互換: Set#to_set はコピーを生成して返す代わりに self を返すようになりました

* uri
* 非互換: URI.decode_www_form は現在の WHATWG による URL 標準に従います。
文字列エンコーディングを指定するために、エンコーデ...

ruby 1.8.3 feature (18.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...change]: 変更されたクラス/メソッドなど(互換性のない変更)
* [obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加

bundled libraryである(rubyの一部ではない)soap4rの変更点については、以下を参考...
...")'
""

=== 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]

追加。

=== 2005-09-13
: Net::HTTP

https での Proxy 認証をサポートするようになりました。

: Net::HTTP.post_form(url, params) [lib] [new]

: Net::HT...
...session_id を受け付けるようになりました。((<ruby-core:4663>))

=== 2005-05-19
: REXML::Encoding#decode_sjis [lib] [bug]
: REXML::Encoding#encode_sjis [lib] [bug]
decode
_sjis と encode_sjis が
逆に定義されていたバグを修正しました。((<ruby-core:4772>))

=== 20...