About psqlodbc internal UTF-8 implementation - Mailing list pgsql-odbc

From Marko Ristola
Subject About psqlodbc internal UTF-8 implementation
Date
Msg-id 435FB06B.6010002@kolumbus.fi
Whole thread Raw
List pgsql-odbc
Hi

I have implemented for Linux Iconv library the following thing:

- psqlodbc uses UTF-8 internally.
- psqlodbc talks with backend with UTF-8.

- Client application uses setlocale() charset for SQLCHAR functions.
- Client application uses SQLWCHAR charset for wide character functions.

So the following things will be converted:
- SQL statement.
- Prepared SQL data.
- SQL result data.

The code is not very stable yet, and I don't know, wether I have time
to make it more stable. Are you interested about it?

The purpose, that I wanted to write such conversions, is, that
I would like to have only one charset inside psqlodbc. So the
parsers would need to understand only one charset, that being UTF-8.

I am able to use it with basic conversions:
- with correct setlocale() setting, I can fetch from UTF-8 database,
LATIN1 or UTF-8 with
a single ODBC driver, with Linux.

So the concept seems to be okay.

Currently the ODBC driver takes most of it's time on parsing activities.

I measured the conversion speed:
My laptop is able to do about 1,5 million conversions per second.
Of course, LATIN1 is an easy case for UTF-8 conversion.

Regards,
Marko Ristola


pgsql-odbc by date:

Previous
From: "Merlin Moncure"
Date:
Subject: slow performance with microsoft dts
Next
From: Dave Page
Date:
Subject: Re: Fix for Declare/Fetch issue