Method: String#to_utf8
- Defined in:
- lib/thefox-ext/ext/string.rb
#to_utf8 ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/thefox-ext/ext/string.rb', line 59 def to_utf8 if is_utf8? self.force_encoding('UTF-8') else self.force_encoding('ISO-8859-1').encode('UTF-8') end end |