Module: Webs::Helper::Encoding

Defined in:
lib/helper/encoding.rb

Instance Method Summary collapse

Instance Method Details

#to_iso8859(s) ⇒ Object



11
12
13
14
15
# File 'lib/helper/encoding.rb', line 11

def to_iso8859( s )
  Iconv.conv("ISO-8859-1", "utf-8",  s )    
rescue
  s
end

#to_utf8(s) ⇒ Object



6
7
8
9
10
# File 'lib/helper/encoding.rb', line 6

def to_utf8( s )
  Iconv.conv("utf-8", "ISO-8859-1", s)    
rescue
  s
end