Skip to Main Content
  • Questions
  • Why NLS_UPPER maps lowercase 'i' to '?' when NLS_SORT is set to 'xturkish'?

Breadcrumb

May 4th

Question and Answer

Chris Saxon

Thanks for the question, Pravin.

Asked: July 21, 2017 - 7:58 am UTC

Last updated: July 25, 2017 - 1:11 pm UTC

Version: 12.2.0.1

Viewed 1000+ times

You Asked

Hello,

Can you please explain why NLS_UPPER in following script maps lowercase 'i' to '?' whereas all other alphabets are mapped correctly to corresponding uppercase alphabets.

SQL> ALTER SESSION SET NLS_SORT="xturkish";

Session altered.

SQL> 
SQL> begin
  2   DBMS_OUTPUT.PUT_LINE('NLS_UPPER(abcdefghijklmnopqrstuvwxyz) = '
  3                || NLS_UPPER('abcdefghijklmnopqrstuvwxyz'));
  4  end;
  5  /
NLS_UPPER(abcdefghijklmnopqrstuvwxyz) = ABCDEFGH?JKLMNOPQRSTUVWXYZ

PL/SQL procedure successfully completed.

and Chris said...

Turkish is unusual because it has to letter "i"s. I spoke with Sergiusz Wolicki, our NLS expert, about this. He had the following to say:

"The first things to check are the database and the client character sets. Both must support the Turkish letter "uppercase I with dot", which is the Turkish uppercase for ASCII "i" aka "lowercase i with dot". AL32UTF8, WE8ISO8859P9, and TR8MSWIN1254 would be the correct character sets."

So check your character sets and see if they give the info you need.



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

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.