Bill Dueber created JRUBY-6637: ---------------------------------- Summary: String encoding difference between jruby --1.9 and MRI 1.9 (force_encoding a no-op in this case?) Key: JRUBY-6637 URL: https://jira.codehaus.org/browse/JRUBY-6637 Project: JRuby Issue Type: Bug Components: Encoding Affects Versions: JRuby 1.6.7, JRuby 1.7 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 Reporter: Bill Dueber Priority: Minor Attachments: encodings.rb
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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email