jruby / jcodings

Java-based codings helper classes for Joni and JRuby
MIT License
21 stars 29 forks source link

Regression in transcoding UTF-8 -> Windows-1255 #22

Closed nirvdrum closed 6 years ago

nirvdrum commented 6 years ago

There appears to be a regression in transcoding UTF-8 -> Windows-1255, introduced sometime after jcodings 1.0.26. The following Ruby code (taken from the MRI test suite), demonstrates the problem:

"\xCA".encode("utf-8", "windows-1255")

With jcodings 1.0.26, this will result in an Encoding::UndefinedConversionError being raised. With jcodings 1.0.28, no error is raised and an empty string is produced instead.

lopex commented 6 years ago

Stale test, it has been removed in 2.4 https://github.com/ruby/ruby/commit/b24e093296c213318f2b5efa070d8294205d4ea3

nirvdrum commented 6 years ago

Oops. Thanks for pointing that out.