Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre2
Assignee: Unassigned
Attachments: set_encoding_test.rb
Components: Core Classes/Modules, Ruby 1.9.3
Created: 20/Aug/12 9:31 PM
Description:

Running the following code:

f = File.new("/tmp/f")
io = f.to_io
e = Encoding.find("ASCII-8BIT")
io.internal_encoding
io.external_encoding
io.set_encoding(e)
puts io.external_encoding

Gives back the output of:

=> #<Encoding:UTF-8>

Instead of:

=> #<Encoding:ASCII-8BIT>

I did notice that the work around of instead doing:

io.set_encoding("ASCII-8BIT")

Worked as expected.

Project: JRuby
Labels: jruby
Priority: Major Major
Reporter: Mark Mandel
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