Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre1
Assignee: Thomas E Enebo
Created: 08/Jul/12 12:31 PM
Description:

There are two pull requests that address this issue:

https://github.com/jruby/jruby/pull/223 (fix for the issue)
https://github.com/rubyspec/rubyspec/pull/146 (add the spec to rubyspec)

just to make it convenient, here's the failing test case, that demonstrate the issue:

it "an ascii substring of a binary string should be encoded UTF-8 without raising an exception" do
      binary_string = "\x82foo"
      ascii_string  = binary_string.bytes.to_a.pack('c*')[1..-1]
      ascii_string.should == "foo"
      ascii_string.encoding.name.should == "ASCII-8BIT"
      utf8_string   = ascii_string.encode("UTF-8")
      utf8_string.should == "foo"
      utf8_string.encoding.name.should == "UTF-8"
    end
Project: JRuby
Priority: Minor Minor
Reporter: John Shahid
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to