pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marko Ristola <marko.ristola@kolumbus.fi>
To: pgsql-odbc@postgresql.org
Subject: About psqlodbc internal UTF-8 implementation
Date: Wed, 26 Oct 2005 19:35:55 +0300
Message-ID: <435FB06B.6010002@kolumbus.fi> (raw)


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




Message-ID: <435FB06B.6010002@kolumbus.fi>
Permalink:  ../435FB06B.6010002@kolumbus.fi/
Also on:    postgresql.org/message-id/435FB06B.6010002@kolumbus.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: marko.ristola@kolumbus.fi
  Subject: Re: About psqlodbc internal UTF-8 implementation
  In-Reply-To: <435FB06B.6010002@kolumbus.fi>
  References: <435FB06B.6010002@kolumbus.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox