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: What causes this exception "Char array not long enough: javaCharsToUtf8Bytes" ?

Re: What causes this exception "Char array not long enough: javaCharsToUtf8Bytes" ?

From: John Russell <johnrussell10_at_home.com>
Date: Sat, 03 Feb 2001 07:57:48 GMT
Message-ID: <oeen7tsul7nrja9mbrr1j7qthdh0q6eru3@4ax.com>

On Thu, 01 Feb 2001 17:43:37 GMT, "Randy" <randy_at_nospam.here> wrote:

>Using JDBC to write data to Oracle 8.1.6 on a Sun Solaris box, I'm getting
>an I/O exception with message:
>
>"Char array not long enough: javaCharsToUtf8Bytes : javaCharsToUtf8Bytes()"
>
>Also, binary data being written to a LONG column appears to be getting
>corrupted.
>
>Does anyone know what causes this and have a solution?
>
>-Randy.
>

For the "char array not long enough" error, did you allocate a buffer that is 3X as long as the number of characters in Java? UTF8 is a multi-byte encoding and sometimes characters take up 3 bytes.

John Received on Sat Feb 03 2001 - 01:57:48 CST

Original text of this message

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