in reply to I need to convert the text into UTF-8 from any charset

It's simple:
use Encode qw(decode); my $input_string = 'some octets'; my $input_encoding = 'cp1250'; # or 'iso-8859-1', or 'shiftjis' or wh +atever my $utf8 = decode($input_encoding,$input_string);
Note that there is no reliable way of determining $input_encoding automatically.

Replies are listed 'Best First'.
Re^2: I need to convert the text into UTF-8 from any charset
by mohiddinb (Initiate) on Aug 09, 2007 at 12:40 UTC
    Thank you joost but it seems its not working fine some of the characters are still malformed i have even tried 1)Text::Iconv 2)use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset); and finally ur suggestion(Encode) but still getting malformed characters any how thanks for ur help Regards, Mohiddin Baig