Skip site navigation (1) Skip section navigation (2)

About psqlodbc internal UTF-8 implementation

From: Marko Ristola <marko(dot)ristola(at)kolumbus(dot)fi>
To: pgsql-odbc(at)postgresql(dot)org
Subject: About psqlodbc internal UTF-8 implementation
Date: 2005-10-26 16:35:55
Message-ID: 435FB06B.6010002@kolumbus.fi (view raw or flat)
Thread:
Lists: 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

Next:From: Dave PageDate: 2005-10-27 05:47:09
Subject: Re: Fix for Declare/Fetch issue
Previous:From: Merlin MoncureDate: 2005-10-26 13:28:55
Subject: slow performance with microsoft dts

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group