End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Kconv.isutf8
Kconv.isutf8(str) => true or false
ext/nkf/lib/kconv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/ext/nkf/lib/kconv.rb, line 193
def isutf8(str)
str.dup.force_encoding(UTF8).valid_encoding?
end
Returns whether input encoding is UTF-8 or not.