るりまサーチ

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

別のキーワード

  1. win32ole cp_oemcp
  2. win32ole cp_maccp
  3. win32ole cp_utf8
  4. win32ole cp_thread_acp
  5. win32ole cp_utf7

ライブラリ

検索結果

Encoding::InvalidByteSequenceError (18012.0)

文字列がそのエンコーディングにおいて不正なバイト列である場合に発生 する例外。

...である場合に発生
する例外。

通常エンコーディング変換時に発生します。

//emlist[例][ruby]{
"\x82\xa0".force_encoding("cp932").encode("UTF-8")
#=> "あ"
"\x82\xa0".force_encoding("EUC-JP").encode("UTF-8")
#=> Encoding::InvalidByteSequenceError: "\x82" on EUC-JP
//}...