Posted on 2003-02-27
scenario : i want to create a file which contains chinese chars of ZHS16CGB231280 charset. my oracle database has been created using UTF8 charset. i have the following column in my table which stores hexadecimal.
what i would i want to do is to convert these hexadecimals into bytes and place it in a file.
my environment variable NLS_LANG has been set to AMERICAN_AMERICA.ZHS16CGB231280
i have tried using utl_file.put_line and utl_raw.cast_to_varchar2(CHINESE_NAME) to create the file using a PL/SQL stored procedure. But the characterset of the contents in the file is still UTF8 (which is the characterset of my DB). what i want my contents of the file to be is ZHS16CGB231280 (GB) charset.
hope any oracle experts can help. thanks in advance.