PostGreSQL Charset problem
Brought to you by:
edwardbenson
Hi there
I have tried to insert a string value as "Ă", "ă" into a
string field with no success running against PostGreSQL
8.0 beta.
It raise an error:
*******
Error returned from ODBC function SQLExecute
ODBC Return Code: -1: SQL_ERROR
ODBC SqlState: HY000
Native Error Code: 7
ERROR: could not convert UTF-8 character 0x00e3 to
ISO8859-1
DBMS: "PostgreSQL", version: 07.05.0002 PostgreSQL
8.0.0beta2 on i686-pc-mingw32, compiled by GCC
gcc.exe (GCC) 3.2.3 (mingw spec, ODBC
Driver: "PSQLODBC.DLL", version: 07.05.0002
*******
How to fix it ?
Thanks in advance
Best Regards
Logged In: YES
user_id=644745
It is problem ODBC of the driver or an adjustment of
connection. Whether look there is in adjustment ODBC of
connection a possibility to set a rule of code conversion of
characters ...
Logged In: YES
user_id=644745
added in version 3.023.
See DbxOpenOdbc.inc
added: PostgreSQL ODBC driver charset conversion bug
("SQLBindParameter").
Logged In: YES
user_id=1343427
I had the same problem and I can't fix it. Is there anyway
of doing that without having to buy any other driver?
Logged In: YES
user_id=644745
dbxoodbc it should be not lower than version 3.023.
It will be enough possible to choose in options DSN, for "
manage DSN " " unicode driver ". By default there it is
specified ANSI. If then to incorporate with adjusted DSN to
help OdbcExplor.exe (from delivery dbxoodbc) it is possible to
see a full line of connection, with all parameters. The
description of all possible parameters should be present at
description PostgreSQL odbc the driver.
Check up file DbxOpenOdbc.inc on presence of definition:
{$DEFINE _FIX_PostgreSQL_ODBC_}
Probably for new versions postgresql odbc this definition is not
necessary.
If not it will turn out try to add in your project file SqlExprFix.
pas and to specify in a connection string the parameter:
coEnableUnicode=1
After definition of this parameter probably it is necessary to
recreate fields (TField) in Field Editor.
All these tests are possible for carrying out by means of
program OdbcExplor (In a file frmOdbcExplor.pas there should
be a definition:
{$define _FIXES_}