Skip to content

ASCII-8bit encoding errors raises wrong class of exception #829

@ConradIrwin

Description

@ConradIrwin

"\xc3".force_encoding('ascii-8bit').encode('utf-8') should raise:
Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8

However, in @tychobrailleur 's 0b8d74b it was changed to be Encoding::ConverterNotFoundError: code converter not found (ASCII-8BIT to UTF-8).

This broke the mail gem's handling of bad encodings on jruby-1.7.4 in ruby1.9 mode. Compare https://travis-ci.org/mikel/mail/jobs/8490907 and https://travis-ci.org/mikel/mail/jobs/7941638

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions