instance method
tidy_bytes
Ruby on Rails 4.1.16
Since v2.2.3Signature
tidy_bytes(force = false)
Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.
Passing true will forcibly tidy all bytes, assuming that the string’s encoding is entirely CP1252 or ISO-8859-1.
Parameters
-
forceopt = false
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 188
def tidy_bytes(force = false)
chars(Unicode.tidy_bytes(@wrapped_string, force))
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 188
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars