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 -> Re: UTF-8 question

Re: UTF-8 question

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 11 Dec 2005 15:58:50 +0100
Message-ID: <439c3eaa$0$9708$626a14ce@news.free.fr>

"lsllcm" <lsllcm_at_gmail.com> a écrit dans le message de news: 1134307625.855411.275760_at_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!

What is strange for me is that you inserted 3 rows, got 3 rows in the first query and 4 rows in the next 2 queries.

Regards
Michel Cadot Received on Sun Dec 11 2005 - 08:58:50 CST

Original text of this message

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