UTF encoding (win32) ?

Поиск
Список
Период
Сортировка
От Rainer Bauer
Тема UTF encoding (win32) ?
Дата
Msg-id oiuul15ng8rsrkkmhnpkueon08255aigbo@4ax.com
обсуждение исходный текст
Список pgsql-odbc
Hello Dave,

I am currently adding support for pgsql for my win32 application. Server is
running on win2k, client on Win9x.

I tested it with the 8.0 version and created a UNICODE database. The data
transfered from and to the database is LATIN1 encoded (WIN1252, to be precise,
but support for that codepage was only added in pgsql 8.1). Using the
08.00.0102 ODBC driver I ran into massive problems, but I have read that the
new 8.01.xxx drivers have adressed this issue.

After some time trying to read/write the data correctly, I found out that I
had to execute "SET CLIENT_ENCODING TO 'UNICODE'" after the connection was
established (and additionally convert the text to UTF-8 when sending data).

But: When I alter text in the database using an UPDATE command, then no
conversion is applied!
Example: UPDATE table_name SET col_text='äöü' WHERE (...)

Now this text goes straight into the database LATIN1 encoded. When I convert
it to UTF-8 then the text stored in the database is "rubbish" and will be
returned as "rubbish".

Is this behaviour by design? Or is the text converted to UTF-8 somwhere on its
way and I just don't see it?

And another question: Which ODBC driver will be shipped with the final pgsql
version 8.1?

And finally: Is it possible to get precompiled driver DLL's for the current
snapshots? Do I only have to replace the psqlodbc.dll or is it necessary to
update any registry keys?

I think that should be enough for my first post here.

Rainer

PS: I have installed pgsql 8.1-beta4 now, but wanted to adress the ODBC issues
before doing any further testing.

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: slow performance with microsoft dts
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: slow performance with microsoft dts