11件ヒット
[1-11件を表示]
(0.527秒)
ライブラリ
- ビルトイン (11)
検索結果
-
Encoding
:: UndefinedConversionError (26030.0) -
エンコーディング変換後の文字が存在しない場合に発生する例外。
...oding::UndefinedConversionError: U+2603 from UTF-8 to EUC-JP
//}
変換が多段階でなされ、その途中で例外が生じた場合は、
例外オブジェクトが保持するエラー情報はその中間のものになります。
//emlist[例][ruby]{
ec = Encoding::Converter.new("ISO-8......UTF-8 but not in EUC-JP.
rescue Encoding::UndefinedConversionError
p $!.source_encoding #=> #<Encoding:UTF-8>
p $!.destination_encoding #=> #<Encoding:EUC-JP>
p $!.source_encoding_name #=> "UTF-8"
p $!.destination_encoding_name #=> "EUC-JP"
puts $!.error_cha...