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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: characterset problem

Re: characterset problem

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: Thu, 16 Aug 2001 11:07:12 -0700
Message-ID: <F001.0036DA66.20010816111911@fatcity.com>

On Thu, 16 Aug 2001, bigplanet34_at_hotmail.com wrote:

> Hi there , We have UTF-8 database. We are using OAS with UTF-8
> setting and java at front end connects to OAS socket to send
> data to be inserted into oracle Is it required to convert data
> send by Java to be converted to UTF8 ? OAS (OAS
> NLS_LANG=AMERICAN_AMERICA.UTF8)
No, sqlnet uses your settings to convert from java's UCS2 to the database character set of UTF8.

> When we send some particuler chinese characters into database I
> get weired results .As shown below . Does it mean 4+2 =5 ?? or
> I am doing something wrong here .
>
> select lengthb(casename), lengthb(caseName||'XX') ,
> lengthb('XX') from case where casepin=736;
>
> LENGTHB(CASENAME) LENGTHB(CASENAME||'XX') LENGTHB('XX')
> ------------------- ------------------------- -------------
> 4 5 2

I wonder if the addition of two single byte characters to a multi-byte character can confuse lengthb?

What does this query return?

select lengthb(casename), lengthb(caseName||'X') , lengthb('X') from case where casepin=736;

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Galen Boyer
  INET: galenboyer_at_hotpop.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 16 2001 - 13:07:12 CDT

Original text of this message

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