Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> how to select chars with ascii > 127 on different platforms
hallo!
i have problems retrieving the correct values from char columns on different platforms (windows, solaris).
i have created the following table
create table charsettest(a_key integer, a_character char(10));
on oracle 8.1.7 on windows 2000.
then i have inserted the following:
insert into charsettest(1, chr(180));
when i issue the following select in sqlplus (on both platforms
connected to the same database)
select ascii(a_character) from charsettest;
i get the output:
ASCII(A_CHARACTER)
180
this looks ok.
now i have a embedded sql program written in c++ using the oracle dynamic sql method4 (sqlda->T[0]=5)
calling this program under windows i get the following:
when fetching "select a_character from charsettest" i get the value
(unsigned char)*sqlda->V[0] == 180
which is ok.
calling this program under solaris (connection to the same database
under windows) with the same select i get the value:
(unsigned char)*sqlda->V[0] == 39
which is, i think, not ok !?
my questions:
how is this possible?
is it possible that there is a problem with different NLS settings?
how can i avoid this? i need a application which retrieves the database values without any conversion! is this possible whichout influence of NLS settings?
if you need further information about the environment, please ask me.
thanks
andreas lederer
Received on Wed Aug 06 2003 - 08:29:28 CDT