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 -> Re: utf8 ,sqlplus, unix, sqlldr and character translation

Re: utf8 ,sqlplus, unix, sqlldr and character translation

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Sun, 11 Aug 2002 19:11:20 -0400
Message-ID: <seC59.132941$D8.4711051@news4.srv.hcvlny.cv.net>


If you set the NLS_LANG properly (specifying UTF8) ... then you should not have any problem.
So if you specify nls_lang to something like American_America.UTF8 in the env settings before
calling your sqlplus script, you will have a utf8 spool file. And if you specify the same for sqlldr (direct=n), you will see the data loaded correctly.

Thus:

export NLS_LANG=American_America.UTF8
sqlplus userid/pass @myscript
...
ftp ...
...
export NLS_LANG=American_America.UTF8
sqlldr userid/pass control=mycontrol

You should test it first .. of course....

Anurag

"andrew" <calbloke_at_yahoo.com> wrote in message news:9256b7c4.0208111405.3b69ab09_at_posting.google.com...
> We have an Oracle 8.1.7 DB (running in Solaris 8) that was altered to
> have an NLS_CHARCTERSET of utf8.
>
> A Weblogic application inserts rows to this DB.
>
> The main two tables were created with mostly CHARACTER datatype
> columns instead of VARCHAR2 .
>
> On a nightly basis a sqlplus script runs that takes data fro this
> oracle DB to a reporting DB (also ORace 8.1.7 on a separate solaris
> box)where the same tables are defined with VARCHAR2 type to save
> space.
>
> Here is my question: If the client app can accept utf-8 encoded
> charaters, will my extract and load scripts that take data from one
> unix box and put it on another using sqlplus, ftp and sqlldr still
> work or will I mangle utf8 encoded characters inthe process ?
>
> Seems to me that somewhere along the line, the charaters will be
> translated back to ascii unless I can tell sqlplus that spool files
> need to be utf8 encoded .
>
> After reading the documentation on NLS etc. , I coulnd't find a good
> explanation of this.
>
> Thanks
Received on Sun Aug 11 2002 - 18:11:20 CDT

Original text of this message

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