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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ODBC and Unicode

Re: ODBC and Unicode

From: Alain Migeon <migeon.alain_at_tdcspace.dk>
Date: Tue, 9 Jan 2007 09:57:14 +0100
Message-ID: <MPG.200d775ab7521379896d6@news.free.fr>


In article <1168269668.059444.129530_at_38g2000cwa.googlegroups.com>, bilbothebagginsbab5_at_freenet.de says...
> > My goal is to have something generic that doesn't depend on specific
> > locales. I am talking about cyrillic characters, but I could have say
> > the same with chinese ones.
> >
> > I am not doing any cut and paste.
> >
> > I am getting my strings by doing a SQLBindColumn, a SQLFetch and a
> > SQLExecute. If I set my NLS_LANG to the same as the database (AL32UTF8),
> > there is no character conversion, and I am getting the set of characters
> > that corresponds to the UTF8 encoding.
> >
> > The problem is when I reuse my strings a query. In that case, the copy
> > paste is only a memory copy of a sequence of bytes.
> > Here I can see, if I try to insert, that a conversion is made between
> > each single char, resulting in corruption of what is inserted.
> >
> > For example, the character U+041F (CYRILLIC CAPITAL LETTER PE), is coded
> > as D09F in UTF8.
> >
> > What happened? When inserting, D0 is inserted as C390 in UTF8, which
> > correcponds to U+00D0.
> >
> > I'll like have a solution where no conversion is made, which Oracle
> > accepting the query as a UTF8 string. I don't know if that is possible.
> >
> > Alain
> >
>
> If your client character set is the same as the DB character set there
> should be no conversion (in neither direction).
> Are you sure/can you check if the conversion happens on Oracle's side
> and not in the application?
>
> br,
> Martin

The query is still in UTF-8 at the time I call the SQLExecDirect function. So something is happening after, maybe in the ODBC layer. But I need to investigate.

Alain



Alain Migeon
Please reverse alain and migeon for replying. Received on Tue Jan 09 2007 - 02:57:14 CST

Original text of this message

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