Ruby 1.9.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Encodingクラス
クラスの継承リスト: Encoding < Object < Kernel < BasicObject
文字エンコーディング(文字符号化方式)のクラスです。Rubyの多言語対応(M17N)機能において利用されます。
例えば文字列オブジェクトは、文字列のバイト表現の他にそのバイト表現がどのエンコーディングによるものであるかも併せて保持しています。この情報は String#encoding により取得できます。 Encoding オブジェクトを返すメソッドにはこの他に IO#internal_encoding, IO#external_encoding などがあります。
@see [[spec:m17n]]
| 定義 | 説明 | |
|---|---|---|
aliases -> Hash
|
エンコーディングの別名に対して元の名前を対応づけるハッシュを返します。 |
|
compatible?(str1, str2) -> Encoding | nil
|
2つの文字列に互換性があるかどうかをチェックします。互換性がある文字列は 結合させることができます。互換性があるときは、結合後の文字列が取るであ ろう Encoding オブジェクトを返します。互換性がない場合は nil を返します。 |
|
default_external -> Encoding
|
規定の外部エンコーディングを返します。 |
|
find(name) -> Encoding
|
指定された name という名前を持つ Encoding オブジェクトを返します。 |
|
list -> [Encoding]
|
現在ロードされているエンコーディングのリストを返します。 |
|
locale_charmap -> String
|
Returns the locale charmap name. |
|
name_list -> [String]
|
利用可能なエンコーディングの名前を文字列の配列で返します。 |
|
| 定義 | 説明 | |
|---|---|---|
base_encoding -> Encoding | nil
|
元となったエンコーディングを返します。 |
|
dummy? -> bool
|
自身がダミーエンコーディングである場合に true を返します。 そうでない場合に false を返します。 |
|
inspect -> String
|
プログラマにわかりやすい表現の文字列を返します。 |
|
name -> String
|
エンコーディングの名前を返します。 |
|
!
!=
==
===
=~
__id__
__send__
_dump
class
clone
dclone
display
enum_for
eql?
equal?
extend
freeze
frozen?
hash
initialize
initialize_copy
instance_eval
instance_exec
instance_of?
instance_variable_defined?
instance_variable_get
instance_variable_set
instance_variables
is_a?
marshal_dump
marshal_load
method
method_missing
methods
nil?
pretty_inspect
pretty_print
pretty_print_cycle
pretty_print_inspect
pretty_print_instance_variables
private_methods
protected_methods
public_methods
remove_instance_variable
respond_to?
singleton_method_added
singleton_method_removed
singleton_method_undefined
singleton_methods
taint
tainted?
tap
to_a
to_ary
to_hash
to_int
to_io
to_proc
to_regexp
to_splat
to_str
to_yaml
to_yaml_properties
to_yaml_style
untaint
.new