in reply to Re^2: I need to convert the text into UTF-8 from any charset
in thread I need to convert the text into UTF-8 from any charset

Then you're doing something else wrong.

Take a look at Writing unicode characters to file using open($fh, ">:utf8, $name) mangles unicode? for a discussion with several examples.

  • Comment on Re^3: I need to convert the text into UTF-8 from any charset