るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.055秒)
トップページ > クエリ:new[x] > クエリ:symbol[x] > クエリ:primitive_convert[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. symbol slice
  2. symbol []
  3. win32ole cp_symbol
  4. tracer event_symbol
  5. json/add/symbol to_json

ライブラリ

クラス

検索結果

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

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

...を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を...
...estination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

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

: hash form
:partial_input => true # source buffer may be part of larger source
:aft...
...on_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence...

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

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

...を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を...
...estination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

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

: hash form
:partial_input => true # source buffer may be part of larger source
:aft...
...on_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence...

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

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

...を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を...
...estination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

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

: hash form
:partial_input => true # source buffer may be part of larger source
:aft...
...on_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence...

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

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

...を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を...
...estination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

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

: hash form
:partial_input => true # source buffer may be part of larger source
:aft...
...on_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence...