Trouble with encoding again - Mailing list pgsql-odbc

From Alejandro D. Burne
Subject Trouble with encoding again
Date
Msg-id 8398dc6d0508240658290fc36e@mail.gmail.com
Whole thread Raw
List pgsql-odbc
Hi, I'll be trying to solve this workaround between postgres odbc
8.01.00.03 and VisualFoxPro(VFP) with spanish chars and unicode
encoding.
VFP''ve 2 ways to send info to rdbms: explicit or by reference:
A little example (I think it's easy to understand)
1) conn=SQLCONNECT('odbc_entry','user','pwd')
2) SQLEXECUTE(conn,"INSERT INTO t1 VALUES ('ñ');)")
3) a='ñ'
4) SQLEXECUTE(conn,"INSERT INTO t1 VALUES (?a);)")

1) Stablish connection
2) Works fine (explicit)
3) Var 'a' takes value ´ñ´
4) This doesn't work (by reference)
This issue works with any other rdbms I tryed (M$SQL, MySQL, Sybase),
including postgres odbc 7.03.02.00 on LATIN10 encoding.

Thanks. Alejandro.

[1628]CC_connect: entering...
[1628]CC_connect(): DSN = 'test', server = 'xxx.xxx.xxx.xxx', port =
'5432', sslmode = 'prefer', database = 'test', username = 'xxxxx',
password='xxxxx'
[1628]connecting to the server
[1628]connecting to the database  using 132.147.161.35 as the server
[1628]the size is 20
[1628]connection to the database succeeded.
[1628]connection to the database succeeded.
[1628]CC_lookup_pg_version: entering...
[1628]PGAPI_AllocStmt: entering...
[1628]**** PGAPI_AllocStmt: hdbc = 35403424, stmt = 35415472
[1628]CC_add_statement: self=35403424, stmt=35415472
[1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='select version()'
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=16, stmt='select version()'
[1628]   stmt_with_params = 'select version()'
[1628]       Sending SELECT statement on stmt=35415472,
cursor_name='SQL_CUR021C65B0'
[1628]send_query(): conn=35403424, query='select version()'
[1628]send_query: setting cmdbuffer = 'select version()'
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]in TL_Constructor
[1628]exit TL_Constructor
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 1
[1628]MALLOC: tuple_size = 100, size = 800
[1628]     done sending the query:
[1628]extend_column_bindings: entering ... self=35415608,
bindings_allocated=0, num_columns=1
[1628]exit extend_column_bindings
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628]PGAPI_Fetch: stmt = 35415472, stmt->result= 35420240
[1628]manual_result = 1, use_declarefetch = 0
[1628]**** SC_fetch: manual_result
[1628]extend_getdata_info: entering ... self=35415820,
gdata_allocated=0, num_columns=1
[1628]exit extend_gdata_info
[1628]fetch: cols=1, lf=0, opts = 35415608, opts->bindings = 35421608,
buffer[] = 0
[1628]PGAPI_GetData: enter, stmt=35415472
[1628]     num_rows = 1
[1628]     value = 'PostgreSQL 8.0.2 on i686-redhat-linux-gnu,
compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)'
[1628]**** PGAPI_GetData: icol = 0, fCType = 1, field_type = 25, value
= 'PostgreSQL 8.0.2 on i686-redhat-linux-gnu, compiled by GCC gcc
(GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)'
[1628]copy_and_convert: field_type = 25, fctype = 1, value =
'PostgreSQL 8.0.2 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
3.4.2 20041017 (Red Hat 3.4.2-6.fc3)', cbValueMax=128
[1628]DEFAULT: len = 105, ptr = 'PostgreSQL 8.0.2 on
i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red
Hat 3.4.2-6.fc3)'
[1628]    SQL_C_CHAR, default: len = 105, cbValueMax = 128,
rgbValueBindRow = 'PostgreSQL 8.0.2 on i686-redhat-linux-gnu, compiled
by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)'
[1628]Got the PostgreSQL version string: 'PostgreSQL 8.0.2 on
i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red
Hat 3.4.2-6.fc3)'
[1628]Extracted PostgreSQL version number: '8.0'
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=1
[1628]QResult: in DESTRUCTOR
[1628]TupleList: in DESTRUCTOR
[1628]TupleList: exit DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]SC_Destructor: self=35415472, self->result=0, self->hdbc=35403424
[1628]ARDFields_free 21c6638 bookmark=21c67f8[1628]ARD_unbind_cols
freeall=1 allocated=1 bindings=21c7da8
[1628]reset_a_column_binding: entering ... self=35415608,
bindings_allocated=1, icol=1
[1628]APD_free_params:  ENTER, self=35415724
[1628]IPD_free_params:  ENTER, self=35415788
[1628]GDATA_unbind_cols freeall=1 allocated=1 gdata=21c7dd0
[1628]SC_Destructor: EXIT
[1628]CC_send_settings: entering...
[1628]PGAPI_AllocStmt: entering...
[1628]**** PGAPI_AllocStmt: hdbc = 35403424, stmt = 35415472
[1628]CC_add_statement: self=35403424, stmt=35415472
[1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='set DateStyle to 'ISO''
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=22, stmt='set DateStyle to 'ISO''
[1628]   stmt_with_params = 'set DateStyle to 'ISO''
[1628]      it's NOT a select statement: stmt=35415472
[1628]send_query(): conn=35403424, query='set DateStyle to 'ISO''
[1628]send_query: setting cmdbuffer = 'set DateStyle to 'ISO''
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]The query was executed successfully and the query did not return
any result
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 0
[1628]MALLOC: tuple_size = 100, size = 0
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628]CC_send_settings: result 0, status 1 from set DateStyle
[1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]QResult: in DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='set geqo to 'OFF''
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=17, stmt='set geqo to 'OFF''
[1628]   stmt_with_params = 'set geqo to 'OFF''
[1628]      it's NOT a select statement: stmt=35415472
[1628]send_query(): conn=35403424, query='set geqo to 'OFF''
[1628]send_query: setting cmdbuffer = 'set geqo to 'OFF''
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]The query was executed successfully and the query did not return
any result
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 0
[1628]MALLOC: tuple_size = 100, size = 0
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628]CC_send_settings: result 0, status 1 from set geqo
[1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]QResult: in DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='set
extra_float_digits to 2'
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=27, stmt='set extra_float_digits to 2'
[1628]   stmt_with_params = 'set extra_float_digits to 2'
[1628]      it's NOT a select statement: stmt=35415472
[1628]send_query(): conn=35403424, query='set extra_float_digits to 2'
[1628]send_query: setting cmdbuffer = 'set extra_float_digits to 2'
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]The query was executed successfully and the query did not return
any result
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 0
[1628]MALLOC: tuple_size = 100, size = 0
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628]CC_send_settings: result 0, status 1 from set extra_float_digits
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=1
[1628]QResult: in DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]SC_Destructor: self=35415472, self->result=0, self->hdbc=35403424
[1628]ARDFields_free 21c6638 bookmark=21c7a58[1628]ARD_unbind_cols
freeall=1 allocated=0 bindings=0
[1628]APD_free_params:  ENTER, self=35415724
[1628]IPD_free_params:  ENTER, self=35415788
[1628]GDATA_unbind_cols freeall=1 allocated=0 gdata=0
[1628]SC_Destructor: EXIT
[1628]CC_lookup_lo: entering...
[1628]PGAPI_AllocStmt: entering...
[1628]**** PGAPI_AllocStmt: hdbc = 35403424, stmt = 35415472
[1628]CC_add_statement: self=35403424, stmt=35415472
[1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='select oid
from pg_type where typname='lo''
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=42, stmt='select oid from pg_type where
typname='lo''
[1628]   stmt_with_params = 'select oid from pg_type where typname='lo''
[1628]       Sending SELECT statement on stmt=35415472,
cursor_name='SQL_CUR021C65B0'
[1628]send_query(): conn=35403424, query='select oid from pg_type
where typname='lo''
[1628]send_query: setting cmdbuffer = 'select oid from pg_type where
typname='lo''
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]in TL_Constructor
[1628]exit TL_Constructor
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 1
[1628]MALLOC: tuple_size = 100, size = 800
[1628]     done sending the query:
[1628]extend_column_bindings: entering ... self=35415608,
bindings_allocated=0, num_columns=1
[1628]exit extend_column_bindings
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628]PGAPI_Fetch: stmt = 35415472, stmt->result= 35420240
[1628]manual_result = 1, use_declarefetch = 0
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=1
[1628]QResult: in DESTRUCTOR
[1628]TupleList: in DESTRUCTOR
[1628]TupleList: exit DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]SC_Destructor: self=35415472, self->result=0, self->hdbc=35403424
[1628]ARDFields_free 21c6638 bookmark=21c7a58[1628]ARD_unbind_cols
freeall=1 allocated=1 bindings=21c79b8
[1628]reset_a_column_binding: entering ... self=35415608,
bindings_allocated=1, icol=1
[1628]APD_free_params:  ENTER, self=35415724
[1628]IPD_free_params:  ENTER, self=35415788
[1628]GDATA_unbind_cols freeall=1 allocated=0 gdata=0
[1628]SC_Destructor: EXIT
[1628]CC_lookup_characterset: entering...
[1628]send_query(): conn=35403424, query='select pg_client_encoding()'
[1628]send_query: setting cmdbuffer = 'select pg_client_encoding()'
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]in TL_Constructor
[1628]exit TL_Constructor
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 1
[1628]MALLOC: tuple_size = 100, size = 800
[1628]QResult: in DESTRUCTOR
[1628]TupleList: in DESTRUCTOR
[1628]TupleList: exit DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]CC_connect: returning...
[1628]szConnStrOut =

'DSN=test;DATABASE=test;SERVER=132.147.161.35;PORT=5432;SSLMODE=prefer;UID=adburne;PWD=xxxx;A6=;A7=100;A8=8192;B0=254;B1=8190;BI=2;C2=dd_;;CX=1b10ba9'
len=148,255
[1628]PGAPI_DriverConnect: returning 0
[1628][SQLGetDiagRecW][1628]PGAPI_GetDiagRec entering rec=1[1628]****
PGAPI_ConnectError: hdbc=35403424 <0>
[1628]enter CC_get_error
[1628]enter CC_create_errormsg
[1628]msg = ''
[1628]exit CC_create_errormsg
[1628]exit CC_get_error
[1628]CC_Get_error returned nothing.
[1628]PGAPI_GetDiagRec exiting 100
[1628][SQLGetFunctions][1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo:
entering...fInfoType=23
[1628]PGAPI_GetInfo: p='<NULL>', len=2, value=2, cbMax=2
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=24
[1628]PGAPI_GetInfo: p='<NULL>', len=2, value=2, cbMax=2
[1628][[SQLAllocHandle]][1628]PGAPI_AllocStmt: entering...
[1628]**** PGAPI_AllocStmt: hdbc = 35403424, stmt = 35415472
[1628]CC_add_statement: self=35403424, stmt=35415472
[1628][SQLGetStmtAttrW][1628]PGAPI_GetStmtAttr Handle=35415472 10010
[1628][SQLGetStmtAttrW][1628]PGAPI_GetStmtAttr Handle=35415472 10011
[1628][SQLGetStmtAttrW][1628]PGAPI_GetStmtAttr Handle=35415472 10012
[1628][SQLGetStmtAttrW][1628]PGAPI_GetStmtAttr Handle=35415472 10013
[1628][SQLSetStmtAttrW][1628]PGAPI_SetStmtAttr Handle=35415472 0,180
[1628]PGAPI_SetStmtOption: entering...
[1628]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 180
[1628][SQLSetStmtAttrW][1628]PGAPI_SetStmtAttr Handle=35415472 4,0
[1628]PGAPI_SetStmtOption: entering...
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=6
[1628]PGAPI_GetInfo: p='PSQLODBC.DLL', len=24, value=0, cbMax=128
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=17
[1628]PGAPI_GetInfo: p='PostgreSQL', len=20, value=0, cbMax=128
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=47
[1628]PGAPI_GetInfo: p='adburne', len=14, value=0, cbMax=128
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=28
[1628]PGAPI_GetInfo: p='<NULL>', len=2, value=2, cbMax=2
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=29
[1628]PGAPI_GetInfo: p='"', len=2, value=0, cbMax=128
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=41
[1628]PGAPI_GetInfo: p='', len=0, value=0, cbMax=128
[1628][SQLGetInfoW(30)][1628]PGAPI_GetInfo: entering...fInfoType=36
[1628]PGAPI_GetInfo: p='Y', len=2, value=0, cbMax=128
[1628][SQLExecDirectW][1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='insert into t1
VALUES ('Ã'')'
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=28, stmt='insert into t1 VALUES ('Ã'')'
[1628]   stmt_with_params = 'insert into t1 VALUES ('Ã'')'
[1628]      it's NOT a select statement: stmt=35415472
[1628]send_query(): conn=35403424, query='insert into t1 VALUES ('Ã'')'
[1628]send_query: setting cmdbuffer = 'insert into t1 VALUES ('Ã'')'
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]The query was executed successfully and the query did not return
any result
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 0
[1628]MALLOC: tuple_size = 100, size = 0
[1628]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[1628][SQLNumResultCols][1628]PGAPI_NumResultCols: entering...
[1628]SC_pre_execute: status = 3
[1628]PGAPI_NumResultCols: result = 35420240, status = 3, numcols = 0
[1628][SQLFreeStmt][1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=0
[1628]recycle statement: self= 35415472
[1628]QResult: in DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]PDATA_free_params:  ENTER, self=35415896
[1628][SQLFreeStmt][1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=3
[1628]APD_free_params:  ENTER, self=35415724
[1628]IPD_free_params:  ENTER, self=35415788
[1628]PDATA_free_params:  ENTER, self=35415896
[1628][SQLBindParameter][1628]PGAPI_BindParameter: entering...
[1628]extend_parameter_bindings: entering ... self=35415724,
parameters_allocated=0, num_params=1
[1628]exit extend_parameter_bindings
[1628]extend_iparameter_bindings: entering ... self=35415788,
parameters_allocated=0, num_params=1
[1628]exit extend_iparameter_bindings
[1628]extend_putdata_info: entering ... self=35415896,
parameters_allocated=0, num_params=1
[1628]exit extend_putdata_info
[1628]PGAPI_BindParamater: ipar=0, paramType=1, fCType=1, fSqlType=12,
cbColDef=1, ibScale=0, rgbValue=14150520, *pcbValue = 1, data_at_exec
= 0
[1628][SQLExecDirectW][1628]PGAPI_ExecDirect: entering...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]PDATA_free_params:  EXIT
[1628]**** PGAPI_ExecDirect: hstmt=35415472, statement='insert into t1
VALUES (? )'
[1628]PGAPI_ExecDirect: calling PGAPI_Execute...
[1628]PGAPI_Execute: entering...
[1628]PGAPI_Execute: clear errors...
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]PDATA_free_params:  EXIT
[1628]Exec_with_parameters_resolved: copying statement params:
trans_status=1, len=26, stmt='insert into t1 VALUES (? )'
[1628]ResolveOneParam: from(fcType)=1, to(fSqlType)=12
[1628]   stmt_with_params = 'insert into t1 VALUES ('Ñ' )'
[1628]      it's NOT a select statement: stmt=35415472
[1628]send_query(): conn=35403424, query='insert into t1 VALUES ('Ñ' )'
[1628]send_query: setting cmdbuffer = 'insert into t1 VALUES ('Ñ' )'
[1628]in QR_Constructor
[1628]exit QR_Constructor
[1628]the server returned the error: ERROR:  secuencia de bytes no
válida para codificación «UNICODE»: 0xd1
[1628]send_query: done sending query
[1628]QR_fetch_tuples: cursor = '', self->cursor=0
[1628]QR_fetch_tuples: past CI_read_fields: num_fields = 0
[1628]MALLOC: tuple_size = 100, size = 0
[1628]STATEMENT ERROR: func=SC_execute, desc='', errnum=7,
errmsg='Error while executing the query'
[1628]CONN ERROR: func=SC_execute, desc='', errnum=108, errmsg='ERROR:
 secuencia de bytes no válida para codificación «UNICODE»: 0xd1'
[1628]PGAPI_ExecDirect: returned -1 from PGAPI_Execute
[1628][[SQLGetDiagFieldW]] Handle=(3,21c65b0) Rec=1 Id=4
[1628]PGAPI_GetDiagField entering rec=1[1628]**** PGAPI_StmtError:
hstmt=35415472 <0>
[1628]SC_get_error: status = 7, msg = #Error while executing the query;
ERROR:  secuencia de bytes no válida para codificación «UNICODE»: 0xd1#
[1628]         szSqlState = 'S1000',len=107, szError='(null)'
[1628]PGAPI_GetDiagField exiting 0
[1628][[SQLGetDiagFieldW]] Handle=(3,21c65b0) Rec=2 Id=4
[1628]PGAPI_GetDiagField entering rec=2[1628]**** PGAPI_StmtError:
hstmt=35415472 <0>
[1628]SC_get_error: status = 7, msg = #Error while executing the query;
ERROR:  secuencia de bytes no válida para codificación «UNICODE»: 0xd1#
[1628]PGAPI_GetDiagField exiting 100
[1628][SQLGetDiagRecW][1628]PGAPI_GetDiagRec entering rec=1[1628]****
PGAPI_StmtError: hstmt=35415472 <512>
[1628]SC_get_error: status = 7, msg = #Error while executing the query;
ERROR:  secuencia de bytes no válida para codificación «UNICODE»: 0xd1#
[1628]         szSqlState = 'S1000',len=107, szError='Error while
executing the query;
ERROR:  secuencia de bytes no válida para codificación «UNICODE»: 0xd1'
[1628]PGAPI_GetDiagRec exiting 0
[1628][SQLGetDiagRecW][1628]PGAPI_GetDiagRec entering rec=2[1628]****
PGAPI_StmtError: hstmt=35415472 <512>
[1628]SC_get_error: status = 7, msg = #Error while executing the query;
ERROR:  secuencia de bytes no válida para codificación «UNICODE»: 0xd1#
[1628]PGAPI_GetDiagRec exiting 100
[1628][SQLCancel][1628]PGAPI_Cancel: entering...
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=0
[1628]recycle statement: self= 35415472
[1628]QResult: in DESTRUCTOR
[1628]QResult: free memory in, fcount=101
[1628]QResult: free memory out
[1628]QResult: exit DESTRUCTOR
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]PDATA_free_params:  EXIT
[1628]PGAPI_Cancel:  PGAPI_FreeStmt returned 0
[1628][SQLCancel][1628]PGAPI_Cancel: entering...
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=0
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]PDATA_free_params:  EXIT
[1628]PGAPI_Cancel:  PGAPI_FreeStmt returned 0
[1628][SQLCancel][1628]PGAPI_Cancel: entering...
[1628]PGAPI_FreeStmt: entering...hstmt=35415472, fOption=0
[1628]recycle statement: self= 35415472
[1628]PDATA_free_params:  ENTER, self=35415896
[1628]PDATA_free_params:  EXIT
[1628]PGAPI_Cancel:  PGAPI_FreeStmt returned 0
[1628][[SQLFreeHandle]][1628]PGAPI_FreeStmt:
entering...hstmt=35415472, fOption=1
[1628]SC_Destructor: self=35415472, self->result=0, self->hdbc=35403424
[1628]ARDFields_free 21c6638 bookmark=21c79b8[1628]ARD_unbind_cols
freeall=1 allocated=0 bindings=0
[1628]APD_free_params:  ENTER, self=35415724
[1628]APD_free_params:  EXIT
[1628]IPD_free_params:  ENTER, self=35415788
[1628]IPD_free_params:  EXIT
[1628]GDATA_unbind_cols freeall=1 allocated=0 gdata=0
[1628]SC_Destructor: EXIT
[1628][SQLDisconnect][1628]PGAPI_Disconnect: entering...

pgsql-odbc by date:

Previous
From: "Alejandro D. Burne"
Date:
Subject: Trouble with encoding
Next
From: "CHEN"
Date:
Subject: Trouble with encoding again