[ODBC] ODBC application works while libpq fails

Поиск
Список
Период
Сортировка
От Igor Korot
Тема [ODBC] ODBC application works while libpq fails
Дата
Msg-id CA+FnnTwMhXiLQTf8cUxVVpyjb=uWXjv9upTOxODhWSo14AgFEQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [ODBC] ODBC application works while libpq fails  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-odbc
 Hi,
I have a very weird situation.

I am trying to develop an application which will connect to the PostgreSQL
server thru 2 different methods: thru the ODBC and using libpq.

Environment:
MacOSX 10.8.
Xcode 4 (latest available for 10.8)
PostgreSQL 9.1 - original from OSX.
Application is compiled with the UNICODE
iODBC DM for OSX 10.8.
Both application and DB server running on the same machine.
The database I'm using was created with the default parameters (just
CREATE DATABASE draft).

When I connect with the ODBC driver, the application works as expected
- no errors or problems.

However when I tried to run the application with libpq I received an
error. The error is:

[quote]
Invalid byte sequence for encoding UTF-8 0xc3\n
[/quote]

The application is written in C++ (not ObjC++).
The table I am trying to query contains the field with the word
"abc+<ALT225>", which inside the database is translated as
"abc\xc3\x9f".

What could be the reason for such behavior?

Is ODBC driver sets the client encoding to some uniform value?
Or there something else?

Thank you.


В списке pgsql-odbc по дате отправления:

Предыдущее
От: Igor Korot
Дата:
Сообщение: Re: [ODBC] HY0000 on SQLDescribeParam
Следующее
От: Keith Handlon
Дата:
Сообщение: [ODBC] SQL_QUERY_TIMEOUT