Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> UTF-8 question

UTF-8 question

From: lsllcm <lsllcm_at_gmail.com>
Date: 11 Dec 2005 05:27:05 -0800
Message-ID: <1134307625.855411.275760@z14g2000cwz.googlegroups.com>


I have a oracle test server 10.2.0.1 on windows 2000, created a db with UTF-8 charset.

CREATE TABLE TEST (C1 VARCHAR2(20); INSERT INTO TEST VALUES ('豐'); --BIG5 tranditional chinese font

INSERT INTO TEST VALUES ('榮');

INSERT INTO TEST VALUES ('张三'); --simplied chinese font

SQL> select dump(c1,1016) from test;

DUMP(C1,1016)


Typ=1 Len=2 CharacterSet=AL32UTF8: d8,53
Typ=1 Len=2 CharacterSet=AL32UTF8: 98,73
Typ=1 Len=4 CharacterSet=AL32UTF8: d5,c5,c8,fd

SQL> select length(c1) from test;

LENGTH(C1)


          1
          2
          2
          2

SQL> select lengthb(c1) from test;

LENGTHB(C1)


          2
          2
          4
          2

  1. The lengthb and length has different result result.
  2. The first row and second row has two bytes space, but the length function return 1 and 2 value, it is strange. Can anyone help on this one?

Thanks in advance! Received on Sun Dec 11 2005 - 07:27:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US