pgaccess and multibyte-enabled libpq

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Cc: Constantin Teodorescu <teo(at)flex(dot)ro>
Subject: pgaccess and multibyte-enabled libpq
Date: 2000-02-16 23:00:42
Message-ID: 200002162300.XAA21280@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

I sent this report to Constantin Teodorescu, as author of pgaccess,
but it now occurs to me that it is probably something to be handled
in libpgtcl instead.

---------------------------------------------------------------------
I have had a bug-report on pgaccess (from PostgreSQL 6.5.3) when used
with multi-byte encoding and with Tcl 8.2.

Your website says that Tcl/Tk 8.0 or higher is needed.
However, there are problems with multibyte-encoding with Tcl8.2 and
I don't see any reference to this in "What's New".

At 8.1, Tcl introduced internationalisation. Everything is reduced
to Unicode internally. If someone uses pgaccess with (say) KOI-8 as
the default encoding for the whole machine, and with a database that
uses KOI-8 encoding, Tcl translates KOI-8 user input to Unicode before
using the data. It then sends the data to the backend in UNICODE, but
does not tell the backend that this is what is happening.

The user may have PGCLIENTENCODING set to KOI8, or may be depending on
his default environment, but Tcl is doing its own thing.

I think that pgaccess needs to translate back to the native encoding
before it sends data to the backend; it also needs to translate data
from the backend to Unicode before using or displaying it.
---------------------------------------------------------------------

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"But as many as received him, to them gave he power to
become the sons of God, even to them that believe on
his name" John 1:12

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2000-02-16 23:20:26 Re: [HACKERS] Date/time types: big changeu
Previous Message Philip Warner 2000-02-16 22:34:43 Re: [HACKERS] Solution for LIMIT cost estimation

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2000-02-17 01:47:05 Re: [INTERFACES] Managing the memory requierments of large query results
Previous Message Bryan White 2000-02-16 22:23:02 Managing the memory requierments of large query results