Re: Character encoding problem using Tcl

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: "Johann Woeckinger" <johann(dot)woeckinger(at)epluse(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Character encoding problem using Tcl
Date: 2000-12-19 23:46:59
Message-ID: 200012192347.eBJNl0P32760@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>"Johann Woeckinger" <johann(dot)woeckinger(at)epluse(dot)at> writes:
>> But when using a Tcl-based interface (e.g. pgaccess or home made tcl
>> based programs) to insert such characters into a table, they are not corre
>ct
>> displayed on queries by use of psql - they appear as two 'unreadable'
>> characters (they appear correct in queries done by the tcl application).
>
>Hm. Tcl 8 uses Unicode (UTF-8) representation internally. It sounds
>like the Unicode representation is getting sent straight to the database
>rather than being converted into the character set the backend is
>expecting.
>
>We could fix this in libpgtcl if we could figure out what Tcl encoding
>corresponds to the character set the backend is using. I'm not sure
>if that's easy or hard.
>
>Alternatively, building Postgres with multibyte support and creating
>your database with UNICODE encoding ought to work.

Tcl changed its behaviour at 8.1. If you use 8.0, it will probably
work.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And the angel said to her, " Do not be afraid, Mary;
for you have found favor with God. And behold, you
will conceive in your womb, and bear a son, and you
shall name Him Jesus." Luke 1:30,31

Browse pgsql-general by date

  From Date Subject
Next Message Dan Harrington 2000-12-20 02:14:47 incrementing values
Previous Message Mark Cowlishaw 2000-12-19 23:35:01 Re: extra spaces