Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/top4r/ext/stdlib.rb

Instance Method Summary collapse

Instance Method Details

#to_gbkObject



20
21
22
# File 'lib/top4r/ext/stdlib.rb', line 20

def to_gbk
  Iconv.iconv("GBK//IGNORE", "UTF-8//IGNORE", self).to_s
end

#to_utf8Object



24
25
26
# File 'lib/top4r/ext/stdlib.rb', line 24

def to_utf8
  Iconv.iconv("UTF-8//IGNORE", "GBK//IGNORE", self).to_s
end