種類
- インスタンスメソッド (231)
- 特異メソッド (125)
- 定数 (55)
- クラス (11)
- 文書 (11)
モジュール
- URI (22)
キーワード
- CP65001 (11)
- String (11)
-
UTF8
_ MAC (11) -
UTF
_ 8 _ HFS (11) -
UTF
_ 8 _ MAC (11) -
ascii
_ compatible? (11) - chr (22)
- compatible? (11)
-
decode
_ www _ form (11) -
decode
_ www _ form _ component (11) - dummy? (11)
- encode (33)
- encode! (22)
-
force
_ encoding (11) - inspect (11)
- name (11)
- names (11)
- new (48)
- open (44)
- replicate (11)
- scrub (33)
- scrub! (33)
-
to
_ s (11) - リテラル (11)
検索結果
先頭5件
-
Encoding
:: UTF _ 8 -> Encoding (15217.0) -
UTF-8。Unicode や ISO 10646 を ASCII 互換な形で符号化するための方式です。
...UTF-8。Unicode や ISO 10646 を ASCII 互換な形で符号化するための方式です。
BOM を含みません。
@see https://tools.ietf.org/html/rfc3629... -
Encoding
:: UTF _ 8 _ HFS -> Encoding (3234.0) -
UTF8-MAC、アップルによって修正された Normalization Form D(分解済み)という形式のUTF-8です。
...UTF8-MAC、アップルによって修正された Normalization Form D(分解済み)という形式のUTF-8です。
@see http://developer.apple.com/jp/technotes/tn1150.html,
http://developer.apple.com/jp/technotes/tn2078.html... -
Encoding
:: UTF _ 8 _ MAC -> Encoding (3234.0) -
UTF8-MAC、アップルによって修正された Normalization Form D(分解済み)という形式のUTF-8です。
...UTF8-MAC、アップルによって修正された Normalization Form D(分解済み)という形式のUTF-8です。
@see http://developer.apple.com/jp/technotes/tn1150.html,
http://developer.apple.com/jp/technotes/tn2078.html... -
URI
. decode _ www _ form(str , enc=Encoding :: UTF _ 8) -> [[String , String]] (247.0) -
文字列から URL-encoded form data をデコードします。
...文字列から URL-encoded form data をデコードします。
application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。
enc で指定したエンコーディングの文字列が URL エンコードされたもの......と
みなし、エンコーディングを付加します。
このメソッドは
https://url.spec.whatwg.org/#concept-urlencoded-parser
にもとづいて実装されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。
req... -
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (235.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 リファ... -
Encoding
. compatible?(obj1 , obj2) -> Encoding | nil (160.0) -
2つのオブジェクトのエンコーディングに関する互換性をチェックします。 互換性がある場合はそのエンコーディングを、 ない場合は nil を返します。
...ます。
//emlist[例][ruby]{
Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
#=> #<Encoding:ISO-8859-1>
Encoding.compatible?(
"\xa1".force_encoding("iso-8859-1"),
"\xa1\xa1".force_encoding("euc-jp"))
#=> nil
//}
引数が文字列でない場合でも、両方のオブジェ......性を判定することができます。
//emlist[例][ruby]{
Encoding.compatible?(Encoding::UTF_8, Encoding::CP932)
# => nil
Encoding.compatible?(Encoding::UTF_8, Encoding::US_ASCII)
# => #<Encoding:UTF-8>
//}
@param obj1 チェック対象のオブジェクト
@param obj2 チェック対象の... -
リテラル (156.0)
-
リテラル * num * string * backslash * exp * char * command * here * regexp * array * hash * range * symbol * percent
...a:num] 数値リテラル
: 123
: 0d123
整数
: -123
符号つき整数
: 123.45
浮動小数点数。
.1 など "." で始まる浮動小数点数は許されなくなりました。0.1 と書く必
要があります。
: 1.2e-3
浮動小数点数
: 0xffff
16進整数
: 0b1......うに記述するのに便利です。
リテラルの最初と、最後には _ を書くことはできません。(リテラルの
前(符号(+,-)の直後を含む)に _を置くとローカル変数やメソッド呼び
出しと解釈されます)
_ は、0x などの prefix の直後に書......文字 あ を表す String。
文字のエンコーディングはEncoding::UTF_8に設定されます。
: ?\C-a
コントロール a を表す String
: ?\M-a
メタ a を表す String
: ?\M-\C-a
メタ-コントロール a を表す String
===[a:command] コマンド出力
//emli... -
Dir
. new(path) -> Dir (142.0) -
path に対するディレクトリストリームをオープンして返します。
...Encoding:UTF-8>
d.close
d = Dir.new(tmpdir, encoding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
end
//}
//emlist[例: Dir.open][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.open(tmpdir, encoding: Encoding::UTF_8)
p d.cla......ss # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
Dir.open(tmpdir, encoding: Encoding::UTF_8) do |d|
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
end
end
//}... -
Dir
. new(path , encoding: Encoding . find("filesystem")) -> Dir (142.0) -
path に対するディレクトリストリームをオープンして返します。
...Encoding:UTF-8>
d.close
d = Dir.new(tmpdir, encoding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
end
//}
//emlist[例: Dir.open][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.open(tmpdir, encoding: Encoding::UTF_8)
p d.cla......ss # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
Dir.open(tmpdir, encoding: Encoding::UTF_8) do |d|
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
end
end
//}... -
Dir
. open(path) -> Dir (142.0) -
path に対するディレクトリストリームをオープンして返します。
...Encoding:UTF-8>
d.close
d = Dir.new(tmpdir, encoding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
end
//}
//emlist[例: Dir.open][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.open(tmpdir, encoding: Encoding::UTF_8)
p d.cla......ss # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
Dir.open(tmpdir, encoding: Encoding::UTF_8) do |d|
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
end
end
//}...