Skip to Main Content
  • Questions
  • Umlaut characters converted to junk while running PL/SQL script

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, mangesh.

Asked: March 10, 2017 - 11:59 am UTC

Last updated: March 14, 2017 - 2:22 pm UTC

Version: 11gr2

Viewed 10K+ times! This question is

You Asked

Hi,

I have procedure with umlaut characters in it. Below is the sample.

CREATE OR REPLACE PROCEDURE procPrintHelloWorld
IS
BEGIN

DBMS_OUTPUT.PUT_LINE('ß ä Ä, Ö, Ü, ä, ö Hello World!');

END;
/

When procedure is created through sql developer, it creates procedure as is without converting those umlaut.
However, when same procedure is executed through sql plus, those characters are changed to some junks and procedure is created with some junks. DBMS_OUTPUT doesn't show same output as shown.

What can be done? Is it Sql plus or Unix/Linux related issue?

Thanks,
MAngesh

and Chris said...

It's down to your NLS_LANG settings and your database character set. If these are different you could have character set conversions.

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:4096861100346310333

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

It worked

Mangesh Deshpande, March 14, 2017 - 1:58 pm UTC

Thanks Chris, it worked. NLS_LANG wasn't set in Sqlplus client. Set it using export NLS_LANG and procedure with German characters is created.
Chris Saxon
March 14, 2017 - 2:22 pm UTC

Great, thanks for letting us know!

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library