Re: import error 1461 with oracle 8.1.6

From: Mike Liu <mike2322_at_hotmail.com>
Date: 24 Jan 2003 11:36:02 -0800
Message-ID: <2262aa8e.0301241136.1a2b9824_at_posting.google.com>


"Samuel Tribehou" <s.tribehou_at_wanadoo.fr> wrote in message news:<b0qoob$28j$1_at_news-reader11.wanadoo.fr>...
> "Mike Liu" <mike2322_at_hotmail.com> a écrit dans le message de news:
> 2262aa8e.0301231142.74a182f1_at_posting.google.com...
> > I think the problem is in character set conversion from WE8ISO8859P1
> > to UTF8. UTF8 uses multi-byte encoding while WE8ISO8859P1 uses
> > single-byte. For instance, characters in the range of 0x0080 - 0x07ff
> > (unicode) have two bytes in UTF8.
> >
> > SQL> select dump(chr(250), 16) from dual;
> >
> > DUMP(CHR(250),1
> > ---------------
> > Typ=1 Len=1: fa
> >
> >
> > SQL> select dump(convert(chr(250), 'UTF8'), 16) from dual;
> >
> > DUMP(CONVERT(CHR(2
> > ------------------
> > Typ=1 Len=2: c3,ba
> >
> > The details of UTF8 encoding is avaiable at
> > http://www.unicode.org/reports/tr27/.
> >
> > In your case, you have some data which are indeed 4000 bytes long in
> > WE8ISO8859P1 database. When you convert them to UTF8, they will be
> > longer than 4000 bytes if there is any character in the data that is
> > in range of 0x0080 and above. That's probably why you got the errors.
> >
> > hth,
> > Mike
>
> Ok, thanks for the clear explanation.
> So I suppose this also means that I can't convert the database to UTF8
> before dumping it since it will need more than 4000 bytes...
> Is there a workaround I could use to pass the data to our customer despite
> this limit ?
> I suppose the only solution left is to feed the database with a script,
> but Oracle won't let me concatenate those fields to create a script since
> concatenations would break the 4000 bytes limit too...

I guess there is no way around this unless you can change the field type to clob or truncate the data when they are longer than 4000 bytes. The bottom line is that you can not store more than 4000 bytes in a varchar2 field.

Mike Received on Fri Jan 24 2003 - 20:36:02 CET

Original text of this message