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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Length of CLOB in bytes.

Re: Length of CLOB in bytes.

From: Krivenok Dmitry <krivenok.dmitry_at_gmail.com>
Date: Thu, 30 Aug 2007 00:52:03 -0700
Message-ID: <1188460323.335207.7530@y42g2000hsy.googlegroups.com>


On Aug 29, 11:35 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:

> "Thomas Kellerer" <FJIFALSDG..._at_spammotel.com> a écrit dans le message de news: 5jlqp1F878..._at_mid.individual.net...

> |
> |
> | Michel Cadot wrote on 29.08.2007 18:18:
> | > "Krivenok Dmitry" <krivenok.dmi..._at_gmail.com> a écrit dans le message de news:
> | > 1188392926.048622.156..._at_57g2000hsv.googlegroups.com...
> | > | Hello!
> | > |
> | > | Is there a way to get the length of a CLOB in bytes (not in chars)?
> | > |
> | > | Thanks!
> | > |
> | >
> | > dbms_lob.getlength if your database is single byte character set
> | > 2*dbms_lob.getlength if your database is multi byte character set
> |
> | What about UTF8?
> | With that encoding one character can be between 1 and 3 bytes...
> |
> | Thomas
>
> When database character set is multi-byte, CLOB is always stored
> in UCS2 whatever is the database character set.
>
> Btw, AL32UTF8 is 1 to 4 bytes per character.

Ok, suppose I have a UTF8 string which consist of 2 characters. Suppose also that 1st character's length = 4 bytes and 2nd character's length = 3 bytes.

What about this simple example?
How many UCS2 characters needed to store this string in CLOB?

>
> Regards
> Michel Cadot
Received on Thu Aug 30 2007 - 02:52:03 CDT

Original text of this message

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