るりまサーチ

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

別のキーワード

  1. openssl utf8string
  2. asn1 utf8string
  3. nkf utf8
  4. nkf utf16
  5. nkf utf32

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Encoding::UTF_8 -> Encoding (18201.0)

UTF-8。Unicode や ISO 10646 を ASCII 互換な形で符号化するための方式です。

...UTF-8。Unicode や ISO 10646 を ASCII 互換な形で符号化するための方式です。

BOM を含みません。

@see https://tools.ietf.org/html/rfc3629...

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (12301.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
にもとづいて実装されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary...
...y.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.decode_www_form_component(str, enc=Encoding::UTF_8) -> String (12301.0)

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

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

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

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

enc で指定したエンコーディングの文字...
...ncoded-form-data
にもとづいて実装されています。


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

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

Encoding::UTF_8_HFS -> Encoding (6218.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 (6218.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...

絞り込み条件を変える

String#force_encoding(encoding) -> self (6206.0)

文字列の持つエンコーディング情報を指定された encoding に変えます。

...情報を指定された encoding に変えます。

このとき実際のエンコーディングは変換されず、検査もされません。
Array#pack などで得られたバイト列のエンコーディングを指定する時に使います。

@param encoding 変更するエンコー...
...す文字列か Encoding オブジェクトを指定します。

//emlist[例][ruby]{
s = [164, 164, 164, 237, 164, 207].pack("C*")
p s.encoding #=> ASCII-8BIT
p s.force_encoding("EUC-JP") #=> "いろは"
p s.force_encoding(Encoding::EUC_JP)...
...#=> "いろは"

u = [12411, 12408, 12392].pack("U*")
u.force_encoding("UTF-8") #=> "ほへと"
u.force_encoding(Encoding::UTF_8) #=> "ほへと"
//}...

Encoding#dummy? -> bool (6106.0)

自身がダミーエンコーディングである場合に true を返します。 そうでない場合に false を返します。

...グに指定できます。また
Ruby はサポートしていないが拡張ライブラリがサポートしているエンコーディングを扱う場合にも
用います。

//emlist[例][ruby]{
Encoding::ISO_2022_JP.dummy? #=> true
Encoding::UTF_8.dummy? #=> false
//}...

String#encode!(encoding, from_encoding, options = nil) -> self (6106.0)

self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。

...なくても self を返します。

@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@ret...
...urn 変換後のself

//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}

@see String#encode...

String#encode!(encoding, options = nil) -> self (6106.0)

self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。

...なくても self を返します。

@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@ret...
...urn 変換後のself

//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}

@see String#encode...
<< 1 2 3 ... > >>