Re: 08.02.04.00 Updating column with Unicode

From: Josef Springer <Josef(dot)Springer(at)joops(dot)com>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: 08.02.04.00 Updating column with Unicode
Date: 2011-04-05 08:27:26
Message-ID: 4D9AD26E.1020300@joops.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello Hiroshi,

the encoding of the databsase is set to UTF-8. So i think, i must use
UTF-8. I have tried allready giving UTF-16 strings, but with the same
results.

Thanks for your help,
Josef

Hiroshi Inoue wrote:
> 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
>
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Marco Gaiarin 2011-04-07 10:53:09 Re: [gaio@sv.lnf.it: [gaio@sv.lnf.it: Centura 1.5.1: moving from ODBC 8 to 9, some trouble]]
Previous Message Hiroshi Inoue 2011-04-05 03:45:22 Re: [gaio@sv.lnf.it: [gaio@sv.lnf.it: Centura 1.5.1: moving from ODBC 8 to 9, some trouble]]