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

Multibyte characters over the frontend/backend protocol

From: Bruce Badger <bruce_badger(at)BadgerSE(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Multibyte characters over the frontend/backend protocol
Date: 2002-12-04 01:54:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I am trying to add multi-byte character support to the Smalltalk 
PostgreSQL driver, and I would really apreciate a bit of help in 
inderstanding the form in which I need to send things to the backend.

I create a database using: "create database multibytetest with encoding 
= ''KOI8'';"

I can see that it has been created OK using "psql -l"; I see: " 
multibytetest | bbadger  | KOI8"

I create a table using: "create table test(string VARCHAR(3));"

Now, here's where I don't know what to do.  I want to insert into the 
new table using something like:
    "insert into test values ("xyz");"
... but where "xyz" is really the KOI8 charaters  0x0422 0x0423 and 0x0416

The question is, what bytes should be sent in the String data type of 
the Query message I send to the back end?

If I make the whole string multi-byte, I get a sytax error at or near "i".

Pointers to documentation or functions in existing code would be much 
apreciated.  Thanks.


pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2002-12-05 00:00:58
Subject: Re: Multibyte characters over the frontend/backend
Previous:From: prashanthDate: 2002-12-03 23:40:47
Subject: Problem with Python interface with PostgreSQL 7.3

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