Sha256: 0f2fe7172f3ebde8f7afc800f002547a560ce2c72f9f5034f474d7390f4ad2cc

Contents?: true

Size: 656 Bytes

Versions: 22

Compression:

Stored size: 656 Bytes

Contents

module UTF8Util
  # use '?' intsead of the unicode replace char, since that is 3 bytes
  # and can increase the string size if it's done a lot
  REPLACEMENT_CHAR = "?"

  # Replace invalid UTF-8 character sequences with a replacement character
  #
  # Returns self as valid UTF-8.
  def self.clean!(str)
    raise NotImplementedError
  end

  # Replace invalid UTF-8 character sequences with a replacement character
  #
  # Returns a copy of this String as valid UTF-8.
  def self.clean(str)
    clean!(str.dup)
  end

end

if RUBY_VERSION <= '1.9'
  require 'resque/vendor/utf8_util/utf8_util_18'
else
  require 'resque/vendor/utf8_util/utf8_util_19'
end

Version data entries

22 entries across 22 versions & 6 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/resque-1.27.4/lib/resque/vendor/utf8_util.rb
resque-1.27.4 lib/resque/vendor/utf8_util.rb
resque-1.27.3 lib/resque/vendor/utf8_util.rb
resque-1.27.2 lib/resque/vendor/utf8_util.rb
resque-1.27.1 lib/resque/vendor/utf8_util.rb
resque-1.27.0 lib/resque/vendor/utf8_util.rb
resqueue-1.0.0 lib/resque/vendor/utf8_util.rb
resque-master-0.0.3 lib/resque/vendor/utf8_util.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/resque-1.26.0/lib/resque/vendor/utf8_util.rb
resque-1.26.0 lib/resque/vendor/utf8_util.rb
resque-1.25.2 lib/resque/vendor/utf8_util.rb
resque-1.26.pre.0 lib/resque/vendor/utf8_util.rb
resque_signal_from_child-1.25.1 lib/resque/vendor/utf8_util.rb
resque-1.25.1 lib/resque/vendor/utf8_util.rb
resque-1.25.0 lib/resque/vendor/utf8_util.rb
resque-1.25.0.pre lib/resque/vendor/utf8_util.rb
resque-1.24.1 lib/resque/vendor/utf8_util.rb
resque-1.24.0 lib/resque/vendor/utf8_util.rb
resque-1.23.1 lib/resque/vendor/utf8_util.rb
resque-1.23.0 lib/resque/vendor/utf8_util.rb