Re: Oracle & Unicode

From: Jim Gregory <Jim.Gregory_at_ncr.com>
Date: Fri, 23 Mar 2001 11:17:22 -0500
Message-ID: <3abb7721$1_at_rpc1284.daytonoh.ncr.com>


Be aware that unicode - UTF8 can be up to 3 bytes long depending on the character set you're working with. You could need a varchar2(480) to store such a string unless you know for a fact that none of your data will be in a character set that needs 3 bytes per character.

--
Jim Gregory
Principal Consultant for Keane, Inc.
Currently assigned to NCR, Dayton, OH

Opinions are my own and do not reflect those
of my employer or clients
"eric nuninger" <e.nuninger_at_nmg.fr> wrote in message
news:999n4c$kb9$1_at_reader1.fr.uu.net...

> The data I want to store is limited at 160 characters. It can be a normal
> string (a character = a byte) or a unicode string (a character = 2 bytes).
> My VarChar length is 160.
> So, I can't store a unicode string that is over 80 characters.
> There is a solution : set the length of my varchar to 320 so I could store
a
> unicode string of 160 characters.
> Thanks for your help.
>
>
> "Todd Gillespie" <toddg_at_linux127.ma.utexas.edu> a écrit dans le message
> news: 997su3$cg9$2_at_geraldo.cc.utexas.edu...
> > eric nuninger <e.nuninger_at_nmg.fr> wrote:
> > : I would like to store a Unicode String in a NCHAR.
> > : It works in a VARCHAR but i can't do it in a NCHAR
> > : I've got an error message : ORA-12704
> > : I've create my database with the character set UTF8
> > : Thank you for your help.
> >
> > 1. Use TRANSLATE().
> > 2. Visit technet and look up your error.
> >
>
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.
> 817/a76999/e12700.htm#1656
> > 3. Why do you want to store a unicode string in an NCHAR? If you built
> > the DB with UTF8 as the char set, then VARCHARs are UTF8. Why dick
around
> > with NCHAR? (Oh, and what *national*charset did you build the DB with?)
>
>
Received on Fri Mar 23 2001 - 17:17:22 CET

Original text of this message