ライブラリ
- ビルトイン (657)
-
cgi
/ core (12) - csv (12)
- kconv (24)
-
minitest
/ unit (1) -
net
/ imap (36) - open-uri (12)
-
rexml
/ document (72) - scanf (12)
- stringio (60)
-
webrick
/ httprequest (24)
クラス
-
ARGF
. class (36) - Array (21)
- CSV (12)
- Encoding (60)
-
Encoding
:: Converter (96) -
Encoding
:: InvalidByteSequenceError (36) -
Encoding
:: UndefinedConversionError (24) - IO (36)
- Integer (24)
-
Net
:: IMAP :: BodyTypeBasic (12) -
Net
:: IMAP :: BodyTypeMessage (12) -
Net
:: IMAP :: BodyTypeText (12) -
REXML
:: Document (36) -
REXML
:: Instruction (24) -
REXML
:: XMLDecl (12) - String (306)
- StringIO (60)
- Symbol (12)
- Time (42)
-
WEBrick
:: HTTPRequest (24)
モジュール
-
CGI
:: QueryExtension (12) -
MiniTest
:: Assertions (1) -
OpenURI
:: Meta (12)
キーワード
- << (12)
-
accept
_ encoding (24) - asctime (12)
- b (12)
- casecmp (12)
- chr (24)
- concat (21)
- content (12)
-
content
_ encoding (12) - convert (12)
- ctime (12)
-
destination
_ encoding _ name (24) - dummy? (12)
- encode (36)
- encode! (24)
-
error
_ bytes (12) -
error
_ char (12) -
external
_ encoding (12) - finish (12)
-
force
_ encoding (12) -
insert
_ output (12) - inspect (42)
-
internal
_ encoding (12) - iseuc (12)
-
mu
_ pp (1) - name (12)
- names (12)
- pack (21)
- putback (24)
- query (12)
-
readagain
_ bytes (12) - replacement (12)
- replacement= (12)
- scanf (12)
- scrub (36)
- scrub! (36)
-
set
_ encoding (108) -
stand
_ alone? (12) - target (12)
-
to
_ s (24) - tolocale (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
-
valid
_ encoding? (12) - version (12)
検索結果
先頭5件
-
String
# valid _ encoding? -> bool (15138.0) -
文字列の内容が、現在のエンコーディングに照らしあわせて妥当であれば true を返します。さもなくば false を返します。
...て妥当であれば
true を返します。さもなくば false を返します。
//emlist[例][ruby]{
"\xc2\xa1".force_encoding("UTF-8").valid_encoding? #=> true
"\xc2".force_encoding("UTF-8").valid_encoding? #=> false
"\x80".force_encoding("UTF-8").valid_encoding? #=> false
//}... -
String
# encode(encoding , from _ encoding , **options) -> String (9401.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
@param encoding 変換先のエ......ンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option 変換オプションをキーワード引数で与えま......列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げます。(デフォルト)
: :invalid => :replace
変換元のエンコーディングにおいて不正な... -
String
# encode(encoding , **options) -> String (9301.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
@param encoding 変換先のエ......ンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option 変換オプションをキーワード引数で与えま......列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げます。(デフォルト)
: :invalid => :replace
変換元のエンコーディングにおいて不正な... -
String
# encode!(encoding , from _ encoding , options = nil) -> self (9240.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... -
Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String (9215.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#destination_encoding... -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (9215.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding... -
StringIO
# external _ encoding -> Encoding (9203.0) -
現在の外部エンコーディングを返します。
現在の外部エンコーディングを返します。 -
StringIO
# internal _ encoding -> Encoding (9203.0) -
現在の内部エンコーディングを返します。
現在の内部エンコーディングを返します。 -
String
# encode(**options) -> String (9201.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
@param encoding 変換先のエ......ンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option 変換オプションをキーワード引数で与えま......列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げます。(デフォルト)
: :invalid => :replace
変換元のエンコーディングにおいて不正な...