Re: [cx-oracle-users] maintaining multiple connections with different encodings
Brought to you by:
atuining
From: Dana P. <da...@gm...> - 2011-05-10 13:37:53
|
Looks like this is an ID10T error. I had previously inserted some data into my test table, which, on the latin-1 database was neither valid latin-1 or valid utf-8 (I blame sqlplus). So as Anthony had said before, setting NLS_LANG to 'AMERICAN_AMERICA.UTF8' gives me utf-8 encoded data from both databases. Thanks for the tip about DUMP(), I didn't know that function existed and wouldn't have figured this out without it. Dana P On Mon, May 9, 2011 at 6:41 PM, Doug Henderson <djh...@te...> wrote: > On 2011-05-09 13:28, Dana Pieluszczak wrote: >> <snip> >> The table below is defined as (NLS_LENGTH_SEMANTICS IS 'BYTE' for both >> databases): >> >> CREATE TABLE test (str VARCHAR2(30 BYTE)); >> >> <snip> > What are the values of NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET from > the sys.nls_database_parameters view? Mine are AL32UTF8 and AL16UTF16 > respectively. > > It may be illuminating to use this query: > > select str, dump(str) from test; > > to see what is actually stored in the table. This is what I get: > dätä Typ=1 Len=6: 100,195,164,116,195,164 > > -- > Doug Henderson, Calgary, Alberta, Canada > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |