Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre2
-
Fix Version/s: JRuby 1.7.0.RC1
-
Component/s: Core Classes/Modules, Ruby 1.9.3
-
Labels:
-
Number of attachments :
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.
Nice softball bug
Looking into it.