Skip to Main Content

SQL & PL/SQL

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!

RPAD issue with triple byte chars

user22292Mar 16 2011 — edited Mar 16 2011
Hi,
when I try to rpad a space with triple byte chars it gives the wrong output. i.e in all the cases the output should be 36.


SELECT length(RPAD('海海海海海海海' ,36,' ')) FROM DUAL -- Triple byte chars
Output:29
SELECT length(RPAD('ééééé' ,36,' ')) FROM DUAL -- Double byte chars
Output:36
SELECT LENGTH(RPAD('MAIN STREET',36,' ')) FROM DUAL -- Single byte chars
Output:36


NLS_CHARACTERSET: UTF8
NLS_NCHAR_CHARACTERSET: AL16UTF16
NLS_LENGTH_SEMANTICS: BYTE


Can any body help me to sort out this.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2011
Added on Mar 16 2011
4 comments
545 views