nex3/sass — Issue #199: Missing encodings prevent sass from working
Author: headius
Created: 2011-10-24 20:31:11+00:00
State: open

There's code in sass/util.rb to check the five major UTF encodings. There's also fallback code that attempts to try a different approach. However, there's no rescue logic to handle the case where one of those encodings is completely unsupported.

JRuby supports 1.9's encoding logic, but in some cases leverages the JVM's own encoding support. Java 5 did not ship with support for UTF-32BE or LE encodings, and so when trying to use those in JRuby on Java 5, we raise the usual 1.9 Encoding::ConverterNotFoundError. It's conceivable other impls may not include one or more encodings as well.

The code should be patched to simply drop support for encodings the current runtime does not have available.

Here's a gist to show the error in action. Note that JRuby 1.6.4 and lower will raise a different internal Java error.

https://gist.github.com/1309997