This is a discussion on convert contents of clob to a different charset within the Oracle Database forums, part of the Database Server Software category; --> Hello, I would like to convert the contents of a clob to a differenct character set. The source is ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, 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. Any ideas? HK |
| ||||
| On 28 Aug 2006 04:55:47 -0700, "prunoki" <hegyvari@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 |