pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: pgsql-hackers@postgresql.org
To: pgsql-interfaces@postgresql.org
Cc: Constantin Teodorescu <teo@flex.ro>
Subject: pgaccess and multibyte-enabled libpq
Date: Wed, 16 Feb 2000 23:00:42 +0000
Message-ID: <200002162300.XAA21280@linda.lfix.co.uk> (raw)

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.Elphick@lfix.co.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 





Message-ID: <200002162300.XAA21280@linda.lfix.co.uk>
Permalink:  ../200002162300.XAA21280@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/200002162300.XAA21280@linda.lfix.co.uk

 · 

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-interfaces@postgresql.org
  Cc: olly@lfix.co.uk, pgsql-hackers@postgresql.org, teo@flex.ro
  Subject: Re: pgaccess and multibyte-enabled libpq
  In-Reply-To: <200002162300.XAA21280@linda.lfix.co.uk>
  References: <200002162300.XAA21280@linda.lfix.co.uk>

* 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