Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: What causes this exception "Char array not long enough: javaCharsToUtf8Bytes" ?
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
![]() |
![]() |