The following code works fine in SQLDeveloper
declare
x varchar2(5 char);
begin
select 'üüüü' into x from dual;
end;
/
But when I run it in sqlplus I get
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
I get a similar error when I in sqldeveloper changes the variable declaration to
x varchar2(5 BYTE)
The question is: why do I get the error in sqlplus and not in sqldeveloper?
Best Answer
Set
NLS_LANG
properly. Here is an example.I use KiTTY for SSH client, with UTF-8 settings.
SQL Developer handles this automatically for you.