Created
April 25, 2012 19:33
-
-
Save MrJaba/2492612 to your computer and use it in GitHub Desktop.
JRuby oddness?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jruby 1.6.7 (ruby-1.9.2-p312) | |
require 'open-uri' | |
a = open("http://pinterest.com/pin/56295064062363076/").read | |
a.encoding | |
=> #<Encoding:UTF-8> | |
b = StringIO.new(a).read | |
b.encoding | |
=> #<Encoding:ASCII-8BIT> | |
Encoding.default_internal | |
=> nil | |
Encoding.default_external | |
=> #<Encoding:UTF-8> | |
# ruby 1.9.3p194 (2012-04-20 revision 35410) | |
require 'open-uri' | |
a = open("http://pinterest.com/pin/56295064062363076/").read | |
a.encoding | |
=> #<Encoding:UTF-8> | |
b = StringIO.new(a).read | |
b.encoding | |
=> #<Encoding:UTF-8> | |
Encoding.default_internal | |
=> nil | |
Encoding.default_external | |
=> #<Encoding:UTF-8> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment