ライブラリ
クラス
- IO (14)
-
Net
:: FTP (36) -
Net
:: IMAP (12) -
Net
:: IMAP :: ResponseText (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
RDoc
:: CodeObject (132) - String (153)
- StringIO (38)
-
URI
:: FTP (12) -
Win32
:: Registry :: Error (12)
モジュール
-
CGI
:: HtmlExtension (24) -
RSS
:: ContentModel (24) - RakeFileUtils (24)
キーワード
- codepoints (52)
- comment= (12)
-
content
_ encoded (12) -
content
_ encoded= (12) -
document
_ children (12) -
document
_ children= (12) -
document
_ self (12) -
document
_ self= (12) -
each
_ codepoint (48) - encode (36)
- encode! (24)
- form (24)
- kconv (12)
-
last
_ response (12) -
last
_ response _ code (12) - lastresp (12)
- nowrite (12)
- parent= (12)
-
parent
_ file _ name (12) -
parent
_ name (12) - section= (12)
-
start
_ doc (12) - status (12)
-
stop
_ doc (12) - typecode= (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - verbose (12)
- xlist (12)
検索結果
先頭5件
-
String
# encode(encoding , from _ encoding , **options) -> String (6131.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...われません。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option......変換オプションをキーワード引数で与えます。
@return 変換された文字列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げま......:replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字に対す... -
String
# encode!(encoding , from _ encoding , options = nil) -> self (6125.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...f を返します。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@return......変換後の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 (6125.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...f を返します。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@return......変換後のself
//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}
@see String#encode... -
String
# unicode _ normalize!(form = :nfc) -> self (6119.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。
...nicode 正規化し
た文字列に置き換えます。
(gsub!などと異なり)変換が行なわれなくても self を返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@ra......Unicode 文字列ではない場合
に発生します。
//emlist[例][ruby]{
text = "a\u0300"
text.unicode_normalize!(:nfc)
text == "\u00E0" # => true
text.unicode_normalize!(:nfd)
text == "a\u0300" # => true
//}
@see String#unicode_no......rmalize, String#unicode_normalized?... -
String
# unicode _ normalize(form = :nfc) -> String (6119.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列を返します。
...正規化形式で Unicode 正規化し
た文字列を返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@raise Encoding::CompatibilityError self が Unicode 文字列ではな......い場合
に発生します。
このメソッドでの "Unicode 文字列" とは、UTF-8、UTF-16BE/LE、
UTF-32BE/LE だけではなく GB18030、UCS_2BE、and UCS_4BE を含みます。
また、self が UTF-8 以外のエンコーディングであった......//emlist[例][ruby]{
"a\u0300".unicode_normalize # => 'à' ("\u00E0" と同じ)
"a\u0300".unicode_normalize(:nfc) # => 'à' ("\u00E0" と同じ)
"\u00E0".unicode_normalize(:nfd) # => 'à' ("a\u0300" と同じ)
"\xE0".force_encoding('ISO-8859-1').unicode_normalize(:nfd)... -
String
# unicode _ normalized?(form = :nfc) -> bool (6119.0) -
self が引数 form で指定された正規化形式で Unicode 正規化された文字列か どうかを返します。
...形式で Unicode 正規化された文字列か
どうかを返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@raise Encoding::CompatibilityError self が Unicode 文字列で......。
//emlist[例][ruby]{
"a\u0300".unicode_normalized? # => false
"a\u0300".unicode_normalized?(:nfd) # => true
"\u00E0".unicode_normalized? # => true
"\u00E0".unicode_normalized?(:nfd) # => false
"\xE0".force_encoding('ISO-8859-1').unicode_normalized?......# => Encoding::CompatibilityError raised
//}
@see String#unicode_normalize, String#unicode_normalize!... -
RSS
:: ContentModel # content _ encoded (6117.0) -
@todo
...@todo... -
RSS
:: ContentModel # content _ encoded= (6117.0) -
@todo
...@todo... -
URI
:: FTP # typecode=(t) (6113.0) -
ファイル転送のタイプを文字列で指定します。
...ファイル転送のタイプを文字列で指定します。
@param t ファイル転送のタイプを文字列で指定します。"a" はテキスト、"i" はバイナリ、"d" はディレクトリを表します。
@raise URI::InvalidComponentError 不正な引数 s に対して発生し... -
Net
:: FTP # last _ response _ code -> String (6108.0) -
サーバからの最後の応答のコードを文字列で返します。
...サーバからの最後の応答のコードを文字列で返します。
例えばログイン(Net::FTP#login)に成功した場合には
"230" を返します。
数字の意味は 959 参照してください。
@see Net::FTP#last_response...