pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Badger <bruce_badger@BadgerSE.com>
To: pgsql-interfaces@postgresql.org
Subject: Multibyte characters over the frontend/backend protocol
Date: Wed, 04 Dec 2002 12:54:29 +1100
Message-ID: <3DED6055.8090702@BadgerSE.com> (raw)

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.




view thread (2+ messages)  latest in thread

Message-ID: <3DED6055.8090702@BadgerSE.com>
Permalink:  ../3DED6055.8090702@BadgerSE.com/
Also on:    postgresql.org/message-id/3DED6055.8090702@BadgerSE.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bruce_badger@BadgerSE.com
  Subject: Re: Multibyte characters over the frontend/backend protocol
  In-Reply-To: <3DED6055.8090702@BadgerSE.com>

* 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