Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ODBC and Unicode
Alain Migeon schreef:
> 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.
No.. Fine distinction - Cyrillic can be a single byte character set,
Chinese never - always multibyte
>
> 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.
Where do the characters come from? There must be some source...
>
> 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.
>
Did you try that with a simple, Oracle provided tool? SQL*PlusW pops to mind - the windowed version of SQL*Plus. When working with SQL*Plus, make sure to use the correct code page (use chcp) and font - one that actually knows how to display multi byte characters
-- Regards, Frank van Bortel Top-posting is one way to shut me up...Received on Wed Jan 10 2007 - 01:26:47 CST
![]() |
![]() |