Re: libpgtcl doesn't use UTF encoding of TCL

From: Reinhard Max <max(at)suse(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <elf(at)solvo(dot)ru>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: libpgtcl doesn't use UTF encoding of TCL
Date: 2001-07-19 10:44:30
Message-ID: Pine.LNX.4.33.0107191214040.8261-100000@wotan.suse.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-interfaces

On Wed, 18 Jul 2001, Tom Lane wrote:

> Reinhard Max <max(at)suse(dot)de> writes:
> > On Wed, 18 Jul 2001, Bruce Momjian wrote:
> >> Do you have any idea how this will work with earlier TCL versions?
>
> > It won't. If pgtcl is supposed to still be able to compile with older
> > versions of Tcl, the changes have to be made a compile time option.
>
> Please do that and resubmit the patch.

OK, I'll pack the new stuff inside #ifdef TCL_UTF8 and define that if
the Tcl version is 8.1 or greater.

Can anybody tell me, if that TCL_ARRAYS stuff is still good for
something? If I could remove it, TCL_UTF8 would be less complex at
some places, because I'd only have to cover two instead of four cases.

BTW, I think the proposed Patch doesn't go far enough as it assumes
the database (client) encoding is identical to the system encoding by
using NULL as the first argument for Tcl_UtfToExternalDString and
Tcl_ExternalToUtfDString. I think it should instead either use the
database's encoding for the conversion to be correct or set
PostgreSQL's client encoding to UNICODE so that no conversion would be
needed. Unfortunately, I don't have the time to do that at the moment.

> We really don't want to give up backwards compatibility just yet.

How far do you want it to be backwards compatible? If >= 8.0 is OK,
I'll possibly overwork libpq later this year to use Tcl's object
interface. I expect at least some performance gain out of this.

cu
Reinhard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Reinhard Max 2001-07-19 14:05:35 Re: libpgtcl doesn't use UTF encoding of TCL
Previous Message Bruce Momjian 2001-07-19 10:28:16 Re: libpgtcl doesn't use UTF encoding of TCL

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Kalchev 2001-07-19 12:30:24 Re: OID wraparound (was Re: pg_depend)
Previous Message Bruce Momjian 2001-07-19 10:28:16 Re: libpgtcl doesn't use UTF encoding of TCL

Browse pgsql-interfaces by date

  From Date Subject
Next Message Markus Wagner 2001-07-19 11:29:31 serious problem with Access ODBC connections and user accounts
Previous Message Bruce Momjian 2001-07-19 10:28:16 Re: libpgtcl doesn't use UTF encoding of TCL