in reply to encoding from Unicode to GB

Once you're in unicode you can use the Unicode modules. They're very nice. Check CPAN for Unicode.