Method: String#to_utf8
- Defined in:
- lib/fir/patches/native_patch.rb
#to_utf8 ⇒ Object
Convert String encoding to UTF-8
25 26 27 |
# File 'lib/fir/patches/native_patch.rb', line 25 def to_utf8 encode(Encoding.find('UTF-8'), invalid: :replace, undef: :replace, replace: '') end |