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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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 



pgsql-hackers by date

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

pgsql-interfaces by date

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

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