Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> CLOB to BLOB + charset conversion

CLOB to BLOB + charset conversion

From: Canobix <canobix_at_gmail.com>
Date: 13 Jul 2005 06:25:39 -0700
Message-ID: <1121261139.274387.71590@g44g2000cwa.googlegroups.com>

  Hi,

  I'm migrating posts between two forum applications. The source stores messages in a LONG field while the destination uses UTF16 stored in a BLOB field. I managed to find info on part of this problem - converting from LONG to BLOB in a PL/SQL procedure that essentialy does this:

1. read in a part of the LONG column into varchar2 buffer
2. convert the buffer to raw (using utl_raw.cast_to_raw)
3. write or append the buffer to blob (using
dbms_lob.write/writeappend)
  What I'm missing is a step between 1 and 2 (or in place of step 2) - I need to convert the buffer to UTF16 and have so far been unable to do so. I am using Oracle 10g and have been trying with utl_i18n.string_to_raw('Somestring','utf16') but that procedure always returns null for some reason (maybe an indicator of something missing in the instalation, beacuse string_to_raw works for utf8)?   Anyhow, I'd appreciate any pointers on what I can try next beacuse I'm running out of ideas.

  Thanks in advance Received on Wed Jul 13 2005 - 08:25:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US