Mittwoch, 21. September 2022

How to UTF-8 with SQL*Plus

Problem

I just had the problem, that, when installing objects with SQL*Plus, some characters have not been taken over correctly.

Solution

Setting NLS_LANG correctly, does the trick. The value of it depends on the language, country and regional settings. Vor German part of Switzerland this can be
GERMAN_SWITZERLAND.UTF8
or
GERMAN_SWITZERLAND.AL32UTF8
where case is not inportant. I do not know what the difference is that
AL32
makes.

On Windows, you can do it from within the system settings. That works for links to the SQL*Plus executable.


On Linux, you might want to place a
export NLS_LANG="GERMAN_SWITZERLAND.UTF8"

into your rc file (e.g. .zshrc) of the shell in question, or maybe more general into your .profile.