For those who wonder, the same encoding can be applied this way:
require 'builder/xchar'
string.to_xs
And to decode, you can do encoded_string.gsub(/\&#([a-f0-9]*);/) { |s|
[$1.to_i].pack('U*') }
Thank you Builder doc!
http://rubydoc.info/gems/builder/2.1.2/frames
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/G0elJcGJtFwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.