#16 PostGreSQL Charset problem


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

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


  • Vadim V.Lopushansky

    Logged In: YES

    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 ...

  • Vadim V.Lopushansky

    Logged In: YES

    added in version 3.023.
    See DbxOpenOdbc.inc

    added: PostgreSQL ODBC driver charset conversion bug

  • nextone_br

    nextone_br - 2005-09-13

    Logged In: YES

    I had the same problem and I can't fix it. Is there anyway
    of doing that without having to buy any other driver?

  • Vadim V.Lopushansky

    Logged In: YES

    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

    If not it will turn out try to add in your project file SqlExprFix.
    pas and to specify in a connection string the parameter:
    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_}


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks