るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.114秒)
トップページ > クエリ:-[x] > クエリ:u[x] > クエリ:OPT[x] > クエリ:primitive_convert[x]

別のキーワード

  1. fileutils opt_table
  2. security opt
  3. rubygems/security opt
  4. win32ole size_opt_params
  5. win32ole_method size_opt_params

ライブラリ

クラス

検索結果

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

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

...定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

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

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

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after out...
...r::AFTER_OUTPUT

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

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src =...