You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has improved with the new CharsetTranscoder, but it still raises an incorrect error:
$ jruby -e '"\xc3".force_encoding("ascii-8bit").encode("utf-8")'
Encoding::InvalidByteSequenceError: ""\xC3"" on US-ASCII
encode at org/jruby/RubyString.java:7619
(root) at -e:1
This error is raised because the only way I could get Java transcoding logic to reject the high bytes of ASCII-8BIT was to require that they be in US-ASCII range...but that causes it to raise an "invalid" error rather than an "undefined" error.
$ jruby -e '"\xc3".force_encoding("ascii-8bit").encode("utf-8")'
Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8
encode at org/jruby/RubyString.java:6231
__script__ at -e:1
"\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
The text was updated successfully, but these errors were encountered: