Ora2Pg
Configuration

Encoding

Configuration for client and database encoding

Special options to handle character encoding

  • NLS_LANG and NLS_NCHAR

    By default, Ora2Pg will set NLS_LANG to AMERICAN_AMERICA.AL32UTF8 and NLS_NCHAR to AL32UTF8. It is not recommended to change these settings, but in some cases it could be useful. Using your own settings with these configuration directives will change the client encoding on the Oracle side by setting the environment variables $ENV{NLS_LANG} and $ENV{NLS_NCHAR}.

  • BINMODE

    By default, Ora2Pg will force Perl to use UTF8 encoding. This is done through a call to the Perl pragma:

use open ':utf8';

You can override this encoding by using the BINMODE directive. For example, you can set it to :locale to use your locale or iso-8859-7. It will respectively use:

use open ':locale';
use open ':encoding(iso-8859-7)';

If you have changed the NLS_LANG to non-UTF8 encoding, you might want to set this directive. See http://perldoc.perl.org/5.14.2/open.html for more information. Most of the time, leave this directive commented.

  • CLIENT_ENCODING

    By default, PostgreSQL client encoding is automatically set to UTF8 to avoid encoding issues. If you have changed the value of NLS_LANG, you might have to change the encoding of the PostgreSQL client.

    You can take a look at the PostgreSQL supported character sets here: http://www.postgresql.org/docs/9.0/static/multibyte.html

  • FORCE_PLSQL_ENCODING

    Enable this directive to force UTF8 encoding of the PL/SQL code exported. Could be helpful in some rare conditions.

On this page

Powered by HexaCluster

HexaRocket

Ora2Pg+ for Enterprises

Need enterprise-grade migration? Get zero-downtime & continuous data replication.

Explore HexaRocket