るりまサーチ

最速Rubyリファレンスマニュアル検索!
220件ヒット [1-100件を表示] (0.138秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

<< 1 2 3 > >>

Encoding::Converter.new(convpath) -> Encoding::Converter (32230.0)

Encoding::Converter オブジェクトを作成します。

...Encoding::Converter オブジェクトを作成します。

@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列

options...
...ng#encode でのハッシュオプションに加えて、以下の定数が利用可能です。

* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Converter::...
...CRLF_NEWLINE_DECORATOR
* Encoding::Converter::CR_NEWLINE_DECORATOR
* Encoding::Converter::XML_TEXT_DECORATOR
* Encoding::Converter::XML_ATTR_CONTENT_DECORATOR
* Encoding::Converter::XML_ATTR_QUOTE_DECORATOR

//emlist[][ruby]{
# UTF-16BE to UTF-8
e
c = Encoding::Converter.new("UTF-16BE", "UTF-...

Encoding::Converter.new(source_encoding, destination_encoding) -> Encoding::Converter (32230.0)

Encoding::Converter オブジェクトを作成します。

...Encoding::Converter オブジェクトを作成します。

@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列

options...
...ng#encode でのハッシュオプションに加えて、以下の定数が利用可能です。

* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Converter::...
...CRLF_NEWLINE_DECORATOR
* Encoding::Converter::CR_NEWLINE_DECORATOR
* Encoding::Converter::XML_TEXT_DECORATOR
* Encoding::Converter::XML_ATTR_CONTENT_DECORATOR
* Encoding::Converter::XML_ATTR_QUOTE_DECORATOR

//emlist[][ruby]{
# UTF-16BE to UTF-8
e
c = Encoding::Converter.new("UTF-16BE", "UTF-...

Encoding::Converter.new(source_encoding, destination_encoding, options) -> Encoding::Converter (32230.0)

Encoding::Converter オブジェクトを作成します。

...Encoding::Converter オブジェクトを作成します。

@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列

options...
...ng#encode でのハッシュオプションに加えて、以下の定数が利用可能です。

* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Converter::...
...CRLF_NEWLINE_DECORATOR
* Encoding::Converter::CR_NEWLINE_DECORATOR
* Encoding::Converter::XML_TEXT_DECORATOR
* Encoding::Converter::XML_ATTR_CONTENT_DECORATOR
* Encoding::Converter::XML_ATTR_QUOTE_DECORATOR

//emlist[][ruby]{
# UTF-16BE to UTF-8
e
c = Encoding::Converter.new("UTF-16BE", "UTF-...

Encoding::Converter#replacement -> String (17115.0)

変換器に設定されている置換文字を返します。

...器に設定されている置換文字を返します。

@return 変換器に設定されている置換文字

//emlist[][ruby]{
e
c = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement #=> "?"

e
c = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement #=> "\uFFFD"
//}...

Encoding::Converter#destination_encoding -> Encoding (17109.0)

変換先のエンコーディングを返します。

...変換先のエンコーディングを返します。

@return 変換先のエンコーディング

//emlist[][ruby]{
e
c = Encoding::Converter.new("utf-8", "euc-jp")
e
c.destination_encoding #=> #<Encoding:EUC-JP>
//}...

絞り込み条件を変える

Encoding::Converter#replacement=(string) (17109.0)

置換文字を設定します。

...置換文字を設定します。

@param string 変換器に設定する置換文字

//emlist[][ruby]{
e
c = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
e
c.replacement = "<undef>"
p ec.convert("a \u3042 b") #=> "a <undef> b"
//}...

Encoding::Converter#source_encoding -> Encoding (17109.0)

変換元のエンコーディングを返します。

...変換元のエンコーディングを返します。

@return 変換元のエンコーディング

//emlist[][ruby]{
e
c = Encoding::Converter.new("utf-8", "euc-jp")
e
c.source_encoding #=> #<Encoding:UTF-8>
//}...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (14209.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes...
...ze 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true...
...op conversion after output before input
: integer form
Encoding::Converter
::PARTIAL_INPUT
Encoding::Converter
::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (14209.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes...
...ze 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true...
...op conversion after output before input
: integer form
Encoding::Converter
::PARTIAL_INPUT
Encoding::Converter
::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> Symbol (14209.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytes...
...ze 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true...
...op conversion after output before input
: integer form
Encoding::Converter
::PARTIAL_INPUT
Encoding::Converter
::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full...

絞り込み条件を変える

<< 1 2 3 > >>