Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CLOB to BLOB + charset conversion
Canobix wrote:
> 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
>
Why are you storing Character data in a Binary object?!?
Just store in a CLOB
-- Regards, Frank van BortelReceived on Wed Jul 13 2005 - 14:02:35 CDT
![]() |
![]() |