Setting the character encoding to UTF-8 on Oracle

In the Oracle database, you must set the character encoding to UTF-8 to correctly store non-English characters. By default, Oracle uses ISO-8859-1. For the database to use UTF-8, the database must be created using this character encoding. You cannot convert an existing ISO-8859-1 database to a UTF-8 character encoded database.

To set the character encoding to UTF-8 on Oracle:

  1. To check what character encoding an Oracle database is using, run this query:
    select * from nls_database_parameters

    This query displays various settings in Oracle that deal with languages. This includes the NLS_CHARACTERSET and NLS_NCHAR_ CHARACTERSET character encoding settings.

  2. Set the NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET parameters to UTF8.

When importing and exporting Oracle UTF-8 databases, you must specify the UTF-8 character set as part of the export or import command.