def utf8tolatin2(s)
begin
#conv = Iconv.new("ISO-8859-2", "UTF-8")
conv = Iconv.new("CP1250", "UTF-8") #Using Windows latin2 instead of iso
out = conv.iconv(s)
conv.close
rescue
#conv = Iconv.new("ISO-8859-2", "ISO-8859-2")
conv = Iconv.new("CP1250", "CP1250") #Using Windows latin2 instead of iso
out = conv.iconv(s)
conv.close
end
return out
end
onsdag 25 november 2009
Prenumerera på:
Kommentarer till inlägget (Atom)
Inga kommentarer:
Skicka en kommentar