Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

to_xs has changed in builder 3 fast_xs should deal with it #1

Open
SamSaffron opened this Issue · 2 comments

2 participants

Sam Bhushan Lodha
Sam
class String
  # XML escaped version of to_s. When <tt>escape</tt> is set to false
  # the CP1252 fix is still applied but utf-8 characters are not
  # converted to character entities.
  def to_xs(escape=true)
    unpack('U*').map {|n| n.xchr(escape)}.join # ASCII, UTF-8
  rescue
    unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252
  end
end
Sam

at the moment fast_xs blows up on an instruct! in rails 3.1

Bhushan Lodha

Yes problem is little but annoying. Please fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.