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: exporting characters from utf8 database to greek

Re: exporting characters from utf8 database to greek

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 10 Oct 2006 09:12:14 -0700
Message-ID: <1160496734.289917.70390@e3g2000cwe.googlegroups.com>

sasfatu_at_gmx.de wrote:
> Hi,
> one of our customer has a problem regarding an export of characters
> from a oracle 8i database.
> The export is ascii based, which means that values for the db will be
> directly written to a .txt file.
>
> In poland one of our customer is fine with the settings in order to
> export polish characters.
> In greece however this is not the case.
> As much as I understood so far is, that it has something to do with the
> following settings
> In windows registry
> HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG
>
> in Oracle
> NLS_NCHAR_CHARACTERSET
> and
> NLS_CHARACTERSET
>
> However I am not sure how to set those values correctly in order to
> store greek characters and in
> order to export them correctly.
> Present settings are
> Win-Registry:
> HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG=GREEK_GREECE.EL8MSWIN1253
>
> Oracle:
> NLS_NCHAR_CHARACTERSET=UTF8
> NLS_CHARACTERSET=UTF8
> Does anbody know how the correct settings should be?
> Thanks
> Poncho

NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET are database character sets, they were specified at database creation time and can't be [easily] changed. Your database have both being UTF8.

The trick here is to have correct charset on the side where export is performed. The client side (that is, the host where export program runs,) should have EL8MSWIN1253 charset so that TTC transparently translates all character data to this charset while transferring it to the client. If the export host runs Windows, then that Registry setting you quoted is correct (unless there's more than one Oracle home on that machine and the export program runs using a different home with different settings.) On any OS, be that Windows or Unix, you can set NLS_LANG environment variable and it will be used by Oracle client software. On Windows, this variable will override anything stored in Registry if set.

Note that any characters in the source character set (UTF-8) that have no corresponding encoding in target character set (windows-1253) will be replaced with question marks. If this is the problem, then this means that your data contains characters not present in windows-1253 charset (or that the NLS charset data Oracle uses for conversion is incorrect.)

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Tue Oct 10 2006 - 11:12:14 CDT

Original text of this message

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