pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Josef Springer <Josef.Springer@joops.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: 08.02.04.00 Updating column with Unicode
Date: Tue, 05 Apr 2011 12:38:35 +0900
Message-ID: <4D9A8EBB.5040703@tpf.co.jp> (raw)
In-Reply-To: <4D99CC03.2020509@joops.com>
References: <4D985F14.7050108@joops.com>
	<4D99C535.7030704@tpf.co.jp>
	<4D99CC03.2020509@joops.com>

Hi Josef,

(2011/04/04 22:47), Josef Springer wrote:
> Hi Hiroshi,
>
> the parameters are bound as an UTF8-encoded bytearray. Because the
> interface is controlled by a Smalltalk application, i think the codings
> does not help you:
> /bytes := v asByteArrayEncoding: #'utf-8'.
> p copyAt: 0 from: bytes size: (size := bytes size) startingAt: 1.
> p at: size put: 0
> /

Unfortunately I know nothing about Smalltalk.
Anyway *Unicode* means UTF-16 as for the drivers.
Could you try to give utf-16 strings?

regards,
Hiroshi Inoue

> Josef Springer
>
> Hiroshi Inoue wrote:
>> (2011/04/03 20:50), Josef Springer wrote:
>>> Hello everybody,
>>>
>>> I have detected some strange behavior updating columns with Unicodes
>>> strings.
>>>
>>> Environment:
>>> PostgreSQL 8.2.5
>>> Database encoding: UTF8
>>> ODBC: PostgreSQL Unicode Version 08.02.04.00
>>>
>>> I am updating via ODBC a column (character varying nnn) of a record to
>>> an unicoded string.
>>>
>>> Updating by using the command as one parameterblock
>>> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件'' WHERE id
>>> = 1'
>>> works right. (the whole parameterblock is encoded to UTF8)
>>>
>>> Updating the record by using the command 'UPDATE adresse SET company=?
>>> WHERE record.id=?'
>>> and providing the arguments for ? UTF8-encoded in an extra buffer
>>> destroys the columns content.
>>>
>>> If i update the column with an UTF8 encoded character in the default
>>> range (the EURO Sign €), it works.
>>>
>>> Can anybody give me some hints ?
>>
>> How do you bind the parameters?
>>
>> regards,
>> Hiroshi Inoue



view thread (7+ messages)  latest in thread

Message-ID: <4D9A8EBB.5040703@tpf.co.jp>
Permalink:  ../4D9A8EBB.5040703@tpf.co.jp/
Also on:    postgresql.org/message-id/4D9A8EBB.5040703@tpf.co.jp

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: inoue@tpf.co.jp, Josef.Springer@joops.com
  Subject: Re: 08.02.04.00 Updating column with Unicode
  In-Reply-To: <4D9A8EBB.5040703@tpf.co.jp>
  References: <4D985F14.7050108@joops.com> <4D99C535.7030704@tpf.co.jp> <4D99CC03.2020509@joops.com> <4D9A8EBB.5040703@tpf.co.jp>

* 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