Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Kconv#iseuc
Kconv.iseuc(str) => true or false
ext/nkf/lib/kconv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/nkf/lib/kconv.rb, line 156
def iseuc(str)
str.dup.force_encoding(EUC).valid_encoding?
end
Returns whether input encoding is EUC-JP or not.
Note don’t expect this return value is MatchData.