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

Home -> Community -> Usenet -> c.d.o.server -> Re: convert contents of clob to a different charset

Re: convert contents of clob to a different charset

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Mon, 28 Aug 2006 13:49:34 +0100
Message-ID: <u5p5f25j9g0kfpvcg9rppt4ngnpf11t2jd@4ax.com>


On 28 Aug 2006 04:55:47 -0700, "prunoki" <hegyvari_at_ardents.hu> wrote:

>I would like to convert the contents of a clob to a differenct
>character set. The source is encoded using ISO8859P2 and the target
>would be UTF8.
>
>I tried to put together something in Java but I get lost.
>
>My purpose is to send the contents of the clob to another application
>which needs UTF8 encoded data.

 The easiest way is to set the NLS_LANG environment variable to .UTF8 (but see [1] below) before connecting; this ensures that _all_ character data is converted to UTF8 as it reaches the client.

 This may be too broad a change if you only want a specific CLOB field converted, though, but would be ideal if the client application expects UTF8 throughout.

[1] You may actually want .AL32UTF8, if you're fussy about the finer points of UTF8 - see manual for more details - but in practice this won't matter if you're coming from an ISO-8859 variant.

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Mon Aug 28 2006 - 07:49:34 CDT

Original text of this message

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