in reply to best way to convert to UTF8 from UTF16

There's more than one way to do it:
use Encode qw(from_to); ... from_to($string, 'UTF-16le', 'UTF-8');

Replies are listed 'Best First'.
Re^2: best way to convert to UTF8 from UTF16
by chuckd (Scribe) on Oct 31, 2008 at 01:10 UTC
    Hi,
    I tried this: from_to($text, "iso-8851-1", "utf8");
    but nothing happened. It looks the same. Am I doing something wrong?
      Why did you change the provided code?
        because when I looked up this function 'from_to()' I didn't see any arguments that looked like the one you provided in your example. When I tried your example from_to($texst, 'UTF-16le', 'UTF-8') I received an error saying "unknown encoding 'UTF-16le' at line #n"