Skip to content

Instantly share code, notes, and snippets.

@arunagw
Created May 29, 2012 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunagw/2827437 to your computer and use it in GitHub Desktop.
Save arunagw/2827437 to your computer and use it in GitHub Desktop.
encoding_issue_jruby_and_ruby
jruby-1.6.7.2 :009 > s = "Foo"
=> "Foo"
jruby-1.6.7.2 :010 > s.encode(s.encoding, :xml => :attr)
=> "Foo"
jruby-1.6.7.2 :011 >
1.9.3p194 :021 > s = "Foo"
=> "Foo"
1.9.3p194 :022 > s.encode(s.encoding, :xml => :attr)
=> "\"Foo\""
1.9.3p194 :023 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment