Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Encoding
-
Labels:
-
Environment:OSX 10.6.8, jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-04-24 6a30d22) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java] and
-
Number of attachments :
Description
Strings seem to be unicode despite attempt to force another encoding under jruby, but not MRI. e.g.
cp866 = "\x8D".force_encoding("IBM866") # "\x8D" under MRI, "\u008D" under jruby
See the attached for a longer explanation and sample code from jrochkind
I don't understand why the attached script is problematic but the encoding tests in the jruby source work.
Unfortunately, I don't really know what I'm doing – just trying to patch a gem and noticing the difference.