Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NLS_CHARACTERSET and SQL Developer

user652526Aug 29 2020 — edited Sep 3 2020

I have an issue with counting the length of a string with multibyte characters in it.

System setup:
Oracle 19c version 19.3.0.0.0 - no patching
SQL Developer Version 19.1.0.094
NLS PARAMTERS

"Parameter"             "Value"               
"NLS_CALENDAR"          "GREGORIAN"           
"NLS_CHARACTERSET"      "AL32UTF8"            
"NLS_COMP"              "BINARY"              
"NLS_CURRENCY"          "$"                   
"NLS_DATE_FORMAT"       "DD-MON-RRRR HH24:MI:SS"
"NLS_DATE_LANGUAGE"     "AMERICAN"            
"NLS_DUAL_CURRENCY"     "$"                   
"NLS_ISO_CURRENCY"      "AMERICA"             
"NLS_LANGUAGE"          "AMERICAN"            
"NLS_LENGTH_SEMANTICS"  "BYTE"                
"NLS_NCHAR_CHARACTERSET""AL16UTF16"           
"NLS_NCHAR_CONV_EXCP"   "FALSE"               
"NLS_NUMERIC_CHARACTERS"".,"                  
"NLS_SORT"              "BINARY"              
"NLS_TERRITORY"         "AMERICA"             
"NLS_TIMESTAMP_FORMAT"  "DD-MON-RR HH.MI.SSXFF AM" 
"NLS_TIMESTAMP_TZ_FORMAT""DD-MON-RR HH.MI.SSXFF AM TZR"
"NLS_TIME_FORMAT"       "HH.MI.SSXFF AM"      
"NLS_TIME_TZ_FORMAT"    "HH.MI.SSXFF AM TZR"  


When I execute the following statement in SQL Developer:

select length('ä2ää13ääXX') from dual;

It returns 10.

When I execute it from SQL PLUS command line it returns 15.

Could someone explain why the difference in the value returned for the count?

Thanks in advance!

John

Comments

Post Details

Added on Aug 29 2020
5 comments
1,523 views