Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ODBC and Unicode
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
![]() |
![]() |