WIth perl 5.8.2 I would do this:
use Encode ;
$string = "text in gb2312";
Encode::from_to($string, "gb2312", "utf8") ;
print $string ;
use Encode ;
$string = "text in gb2312";
Encode::from_to($string, "gb2312", "utf8") ;
print $string ;