Project

General

Profile

Actions

Bug #830

closed

Encoding::UndefinedConversionError

Added by rubikitch (rubikitch .) almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
Backport:
[ruby-dev:37285]

Description

=begin
Encoding::UndefinedConversionErrorのエラーメッセージは
内部のUTF-8ではなくて変換元(この場合EUC-JP)を示したほうがわかりやすいと思います。

-- coding: euc-jp --

"ああ".encode("US-ASCII") rescue $!

=> #<Encoding::UndefinedConversionError: "\xE3\x81\x82" from UTF-8 to US-ASCII>

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0